of CPU is non-power of 2. Fixes PR/37244.
- sched_enqueue: initialize sl_lrtime, when it is zero (new thread).
Part of PR/37245.
- Fix the mints/maxts sysctl helpers, use mstohz() for the checks. Also,
I meant miliseconds, not microseconds. Found by <bjs>.
- Fix inverted logic with r_mcount in M2;
- setrunnable: perform sched_takecpu() when making the LWP runnable;
- setrunnable: l_mutex cannot be spc_mutex here;
This makes cpuctl(8) work with SCHED_M2.
OK by <ad>.
I don't like doing this, but there's too much pain to get this file
to compile clean due to how SPINLOCK_{BACKOFF,SPIN}_HOOK and
mb_write() are spread out in weird weird places throughout MD code.
by deleting arguments. This is a popular practice, and failing means that
ps(1) prints (programname). For example this is what XtOpenDisplay() with
-geometry. This used to work before 2.0H, and the behavior is allowed and
hinted by POSIX. Found out by Anon Ymous.
- uiomove: don't bother dropping kernel_lock if moving less than 1k.
- Catch up with vfsops reference counting changes (for LKMs).
- Add crit_enter()/crit_exit(). These bound critical sections in which
kernel preemption is to be disabled. Better names welcome.
- G/C spinlockmgr() and simple_lock debugging.
- Always include the kernel_lock functions, for LKMs.
- Slightly improved subr_lockdebug code.
- Keep sizeof(struct lock) the same if LOCKDEBUG.
on the original approach of SVR4 with some inspirations about balancing
and migration from Solaris. It implements per-CPU runqueues, provides a
real-time (RT) and time-sharing (TS) queues, ready to support a POSIX
real-time extensions, and also prepared for the support of CPU affinity.
The following lines in the kernel config enables the SCHED_M2:
no options SCHED_4BSD
options SCHED_M2
The scheduler seems to be stable. Further work will come soon.
http://mail-index.netbsd.org/tech-kern/2007/10/04/0001.htmlhttp://www.netbsd.org/~rmind/m2/mysql_bench_ro_4x_local.png
Thanks <ad> for the benchmarks!
- Replace most panic() checks with KASSERT();
- msgrcv1: Improve readability;
- Remove #ifdef ENOMSG;
No function changes of the interface are intented.