From 7904a438e50d7cc9ee78c6f2cb8a6d4cb1c971fc Mon Sep 17 00:00:00 2001 From: mav Date: Fri, 20 Mar 2015 15:07:05 +0000 Subject: [PATCH] Add comment explaining existing powerd behavior on SMP systems. MFC after: 1 week --- usr.sbin/powerd/powerd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 3f628f6a30c9..367a31f41c58 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) {