summaryrefslogtreecommitdiffstats
path: root/usr.sbin/powerd
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-27 09:01:25 +0000
committermav <mav@FreeBSD.org>2015-03-27 09:01:25 +0000
commit713a1f945de08c9c2a38c23fbef74671ec53b4fa (patch)
tree0cd590969091bd8a3fb3b404f557d7797a172f10 /usr.sbin/powerd
parent9d1b41e02f8c695a4b71aedd1f7cd4f94b39b6ac (diff)
downloadFreeBSD-src-713a1f945de08c9c2a38c23fbef74671ec53b4fa.zip
FreeBSD-src-713a1f945de08c9c2a38c23fbef74671ec53b4fa.tar.gz
MFC r280286: Add comment explaining existing powerd behavior on SMP systems.
Diffstat (limited to 'usr.sbin/powerd')
-rw-r--r--usr.sbin/powerd/powerd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index 3f628f6..367a31f 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -127,6 +127,12 @@ static int devd_pipe = -1;
#define DEVD_RETRY_INTERVAL 60 /* seconds */
static struct timeval tried_devd;
+/*
+ * This function returns summary load of all CPUs. It was made so
+ * intentionally to not reduce performance in scenarios when several
+ * threads are processing requests as a pipeline -- running one at
+ * a time on different CPUs and waiting for each other.
+ */
static int
read_usage_times(int *load)
{
OpenPOWER on IntegriCloud