]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add -N option to powerd(8) to ignore "nice" time.
authorColin Percival <cperciva@FreeBSD.org>
Sat, 29 Feb 2020 22:31:23 +0000 (22:31 +0000)
committerColin Percival <cperciva@FreeBSD.org>
Sat, 29 Feb 2020 22:31:23 +0000 (22:31 +0000)
commitd91382866fc261ac16cf78f204eb7490f082f3d4
treec83d9334b9407307f6bb78595d3c11821e96ee15
parent9ea5bef27f082bf3f3284d867f29ad32c1227379
Add -N option to powerd(8) to ignore "nice" time.

With powerd_flags="-N", this makes powerd(8) exclude "nice" time when
computing the CPU utilization.  This makes it possible to prevent
CPU-intensive "background" processes from spinning up the CPU.

Note that only *userland* CPU usage belonging to "nice" processes is
excluded; we do not track whether time spent in the kernel is on behalf
of nice or non-nice processes, so kernel-intensive nice processes can
still result in the CPU being sped up.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D23868
usr.sbin/powerd/powerd.8
usr.sbin/powerd/powerd.c