Port identifycpu() to userspace. The kernel lies and reports on cpuN while
actually using the values from cpu0, but this attempts to bind itself to the
requested CPU if running as root. That doesn't work properly yet due to
kern/38588, but will do once that's fixed.
one of the following:
- Holding kernel_lock (indicating that the code is not MT safe).
- Bracketing critical sections with kpreempt_disable/kpreempt_enable.
- Holding the interrupt priority level above IPL_NONE.
Statistics on kernel preemption are reported via event counters, and
where preemption is deferred for some reason, it's also reported via
lockstat. The LWP priority at which preemption is triggered is tuneable
via sysctl.
current value as well as critical limits set and sensor unit.
* Add a new flag: -T. When it's enabled statistics will be created for
the sensors. Max, min and average statistics as well as sensor unit
will be displayed. Must be used with an interval.
You can see the new code in action here:
http://www.netbsd.org/~xtraeme/envstat_stats.txt
Thanks to jmcneill@ for comments and ideas.
Changes beyond OpenBSD's driver:
- Improved support for AMD K8
- Added support for AMD Barcelona, AMD Phenom and AMD Griffin
Tested on various single and multi-socket machines.
Review and OK xtreame
via the -s flag (the requirement for -d is not there anymore). [1]
You can do something like the following now:
$ envstat -s "acpibat0:charge,acpibat0:charge state,acpitz0:temperature"
[acpibat0]
charge: 3.015 Ah (79.70%)
charge state: NORMAL
[acpitz0]
temperature: 54.000 degC
$
* As bonus, the code has been modified to use a simple queue for
the sensors, and this has simplified and improved some parts of the
code as well.
[1] Item requested by joerg@ yesterday.
btuartd(8) should be named btattach(8) for consistency
with other parts of NetBSD
make btattach(8) a single-use tool for less complexity
device specicific initialisation (from btuart(4)) is carried
out prior to activating the line discipline (in btattach(8)),
which simplifies the API somewhat and means that the user
tool and the kernel do not need to be kept in sync.
btuart(4) driver is much reduced; naming is made consistent
and all tsleep() and delay() are removed to userland
there are no waiters. This gives a major boost to build.sh on larger
systems as directory vnode locks are exclusive for lookup, but are often
only held for a very short period of time.
This change has the potential to more readily expose lock order reversals
and other types of deadlock.
ends up as c99 variable-sized local arrays (CMSG_SPACE() uses a function
as part of calculating its result). This causes the stack protection
code in the compiler to complain, so build this one with -fno-stack-protector
to avoid the problem.
Gets us back to buildability for this program for a number of our ports.
XXX: still not 100% "safe", except that we're in a protected directory.
XXX: arguably we should keep the fds open and fdopen(3) dup()s,
XXX: but we're in a protected directory so it shouldn't matter.
Provide a separate ypdb_mktemp() API to open a temporary file read-write.
Use mkstemp() instead of mktemp().
NOTE: makedbm & mkalias tested ok. I couldn't test ypxfer.