summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-20 15:07:05 +0000
committermav <mav@FreeBSD.org>2015-03-20 15:07:05 +0000
commit7904a438e50d7cc9ee78c6f2cb8a6d4cb1c971fc (patch)
tree9dd60ff3a925989f421a82c269332144ddc18de2 /usr.sbin
parente04a003ec37c132e402afe6def1740116c42c0e2 (diff)
downloadFreeBSD-src-7904a438e50d7cc9ee78c6f2cb8a6d4cb1c971fc.zip
FreeBSD-src-7904a438e50d7cc9ee78c6f2cb8a6d4cb1c971fc.tar.gz
Add comment explaining existing powerd behavior on SMP systems.
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-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