kevlo
c74ac9adc1
getopt(3) returns -1, not EOF.
2008-02-18 03:19:25 +00:00
marck
d5c48380b2
Failing to set new frequency should not lead to powerd exiting.
...
Change err(3) to warn(3) as three other cases.
Approved by: njl, des
2007-06-13 19:05:11 +00:00
des
2c73974f3f
Back out revs 1.18 and 1.19; they were based on incorrect assumptions.
...
Requested by: nate
2006-02-19 00:40:28 +00:00
des
733ad39b75
Look for cpu/ichss instead of cpu/p4tcc, which is i386/amd64-only.
2006-02-18 16:01:07 +00:00
des
8fe6e13e40
Load cpufreq at startup if it isn't there already.
2006-02-18 11:35:12 +00:00
des
c5944732d8
Don't use threads when there's no real reason to.
...
MFC after: 2 weeks
2006-01-03 21:32:02 +00:00
njl
427aeb138a
Create the devd thread after we have called daemon(). Otherwise, it would
...
be killed when the parent exits.
Submitted by: Rudolf Cejka <cejkar / fit.vutbr.cz>
2005-10-24 18:34:54 +00:00
njl
39560838ba
Whitespace fix.
2005-10-23 00:55:56 +00:00
njl
cd579e831a
Set the signal handlers before creating the thread. This is so it inherits
...
the parent's signal mask. Once daemon() forked, signals would be ignored
in the child thread. While I'm here, check the return value of daemon().
This fixes termination in the daemon case (bug introduced in last commit).
Noticed by: Frederik Lindberg
2005-10-20 05:12:20 +00:00
njl
d5e033e83c
Use a pipe for reading devd events as another method of getting the AC line
...
status. Add a thread that waits for events on the named pipe instead of
polling the line status via apm or the ACPI sysctl. Additionally, use
robust error handling in case devd goes away or we temporarily can't set
a frequency (i.e., passive cooling has preempted our setting).
Later, this should be improved so that if adaptive control is not being used,
we will block while waiting for AC line events, saving a little CPU.
Submitted by: Frederik Lindberg <fli+freebsd-current/shapeshifter.se>
2005-10-19 04:48:44 +00:00
des
953bbe6a0d
Accept "maximum" and "minimum" modes as well as their abbreviations.
...
MFC after: 2 weeks
2005-09-26 12:16:27 +00:00
pjd
3d2323799f
Test last minute changes, as gcc isn't too smart.
...
Reported by: Steve Kargl <sgk@troutmask.apl.washington.edu>
2005-08-24 19:42:40 +00:00
pjd
6de559363a
Add '-P' option which allows to specify pidfile.
2005-08-24 17:32:41 +00:00
bruno
16471328fb
Change the default adaptive algorithm for phk's one. Thanks to phk
...
and Kevin Oberman for this work.
Submitted by: Kevin Oberman
Reviewed by: njl
Approved by: njl
2005-08-24 07:52:59 +00:00
njl
b7400ec2b9
powerd(8) requires root permissions to run so notify the user if they
...
try to start it without this.
Submitted by: Philip S. Schulz
MFC after: 2 days
2005-07-25 16:43:12 +00:00
ume
ab226d7010
Ignore EPERM from sysctl(3). It is returned when passive cooling
...
is active.
Reviewed by: njl
2005-07-18 20:15:31 +00:00
njl
ef01f96275
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
njl
46d7cfdb4b
Add support for recording the total energy used (in joules) when in
...
verbose mode. This is useful for profiling new adaptive algorithms
in performance (via time(1)) and total energy consumed for a given
workload.
2005-04-10 19:02:29 +00:00
njl
a59663d2e5
Move the AC line checking code into its own function, reducing the
...
ifdef __i386__ stuff for APM. Tested as working correctly on i386 and
compile-tested on sparc64.
2005-02-27 01:58:49 +00:00
marcel
3ebf74b8a8
Unbreak !i386 platforms. Only i386 has APM, so don't try to fallback
...
on APM on other platforms.
2005-02-27 00:23:19 +00:00
njl
2347ac87e8
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
njl
3960f7cce3
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