Commit Graph

21 Commits

Author SHA1 Message Date
Felix Johnson
ec071430a7 powerd(8): Add rc.conf(5) to see also
powerd_flags is mentioned in rc.conf(5) and can be set there and pass to
powerd.

PR:		258320
MFC after:	3 days
Reported by:	Michael <michael.hmich@gmail.com>
2021-11-06 22:43:30 -04:00
Mateusz Piotrowski
98b486dc7a powerd.8: Improve style & fix typos
- Sort options.
- Do not use macros (like .Ar) to specify width for Bl (macros within that
  string are not expanded).
- Use Cm instead of Ar for mode names.
- Fix some typos reported by mandoc.
- Move the documentation of the PID file from the -P flag description to
  the FILES section.

Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23941
2020-03-03 13:25:08 +00:00
Colin Percival
d91382866f 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
2020-02-29 22:31:23 +00:00
Andriy Voskoboinyk
5c81ba5ade powerd(8): allow to force a method of battery state query
This change allows to determine power source via sysctl or /dev/apm
when devd(8) is running (used by default).

Based on patch from PR; other changes on top of it:
- '-f' (force) -> '-s' (source) parameter renaming;
- allow 'apm' -> 'devd' transition when '-s devd' is set
(if APM is enabled);
- man page update.

Checked on amd64 with -s devd / sysctl and apm
(an extra build with forced USE_APM define set was done)

PR:		125707
Submitted by:	Konstantin Stepanov <milezv@yandex.ru>
Reviewed by:	bcr, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18742
2019-01-06 02:39:03 +00:00
Warren Block
27f90bebef Put the power modes in a list to make them easier to find.
Reviewed by:	joel
MFC after:	1 week
2013-07-04 12:24:39 +00:00
Rebecca Cran
cf2280aca7 Add -m and -M options to control the minimum and maximum frequency.
PR:	bin/145063
Submitted by:	Boris Kochergin <spawk at acm.poly.edu>
Reviewed by:	cperciva
Approved by:	rrs (mentor)
MFC after: 2 weeks
2010-08-17 09:11:38 +00:00
Joerg Wunsch
0a47b5f57f then -> than
MFC after:	1 day
2010-03-15 16:06:52 +00:00
Gavin Atkinson
484b7a091f Grammar and minor tweaks to powerd(8) man page.
PR:		docs/133186
Approved by:	ed (mentor)
MFC after:	2 weeks
2009-12-21 22:56:06 +00:00
Tom Rhodes
5d8e279e37 Fix a typo higter->higher.
Spotted by:	ganbold
2008-12-24 09:17:30 +00:00
Alexander Motin
dbd3197760 Set of powerd enchancements:
1. Make it more SMP polite. Previous version uses average CPU load that
often leads to load underestimation. It make powerd with default
configuration unusable on systems with more then 2 CPUs. I propose to use
summary load instead of average one. IMO this is the best we can do without
specially tuned scheduler. Also as soon as measuring total load on SMP
systems is more useful then total idle, I have switched to it.

2. Make powerd's operation independent from number and size of frequency
levels. I have added internal frequency counter which translated into real
frequencies only on a last stage and only as good as gone. Some systems may
have only several power levels, while others - many of them, so adaptation
time with previous approach was completely different.

3. As part of previous I have changed adaptive mode to rise frequency on
demand up to 2 times and fall on 1/8 per time internal.

4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive".
It rises frequency twice faster, drops it 4 times slower, prefers twice
lower CPU load and has additional delay before leaving the highest frequency
after the period of maximum load. This mode was specially made to improve
interactivity of the systems where operation capabilities are more
significant then power consumption, but keeping maximum frequency all the
time is not needed.

5. I have reduced default polling interval from 1/2 to 1/4 of second.
It is not so important for algorithm math now, but gives better system
interactivity.

Discussed on:	mobile@
2008-11-18 13:24:38 +00:00
David E. O'Brien
dc70a966e3 Add an abbreviation for adaptive mode, and document all the abreviations. 2008-06-22 17:52:57 +00:00
Joel Dahl
19797b2256 s/5.5/6.0/ in HISTORY section.
Discussed with:	ru
2005-11-24 09:25:10 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
Pawel Jakub Dawidek
177b9d3b7b Be more consistent with the rest of the manual page. 2005-11-06 20:01:47 +00:00
Dag-Erling Smørgrav
db20dc4dbb Accept "maximum" and "minimum" modes as well as their abbreviations.
MFC after:	2 weeks
2005-09-26 12:16:27 +00:00
Pawel Jakub Dawidek
84148fd1da Add '-P' option which allows to specify pidfile. 2005-08-24 17:32:41 +00:00
Ruslan Ermilov
83c94dadce Fixed markup.
Approved by:	re
2005-06-16 20:01:43 +00:00
Nate Lawson
2f8ad6c087 Drop the default running value to 60% from 80%. Testing shows that we
cycle too much, wasting power if we trigger a jump to full speed too
easily.  CPU-bound tasks quickly push idle below this level.
2005-04-10 20:42:55 +00:00
Christian Brueffer
7f2f06281c man page -> manual page 2005-02-27 15:49:07 +00:00
Nate Lawson
b3c9af5615 Change the default levels for adaptive mode to 80% and 90%. On a system
with moderate IO going on, system usage can hover around 65-77% even
though it would benefit from higher performance.  Typically, only truly
idle systems pass the 90% mark so only demote then.
2005-02-26 23:22:00 +00:00
Nate Lawson
5883360b2f Import powerd(8), a utility for managing power consumption. Currently, it
just uses cpufreq(4) but in the future it should also do things like spin
down disks.  This is based on the work by Colin Percival (called "estctrl").
2005-02-26 21:17:31 +00:00