never sleep. Should fix PR/37245 by <yamt>.
- Fix a regression - dissalow catching of bound threads. Also, allow
migration of non-bound kthreads, this restriction seems pointless.
- Few micro-optimisations, misc.
Fixes the problems with systems having > 2GB of memory;
From <drochner>, thanks for catching this!
- Convert pool to pool-cache;
- Adjust copyright while here;
- Include PRI_HIGHEST_TS value into the increasion range,
it was missed previously by mistake;
- More KASSERTs to handle invalid priorities of threads;
- Remove PRI_DEFAULT;
- Misc;
Add schedctl(8) - a program to control scheduling of processes and threads.
Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;
Proposed on: <tech-kern>. Reviewed by: <ad>.
- Re-enqueue the thread when priority changes and it is in LSRUN state;
- Handle the __HAVE_FAST_SOFTINTS case in sched_curcpu_runnable_p();
- Few minor changes;
tech-kern:
- Invert priority space so that zero is the lowest priority. Rearrange
number and type of priority levels into bands. Add new bands like
'kernel real time'.
- Ignore the priority level passed to tsleep. Compute priority for
sleep dynamically.
- For SCHED_4BSD, make priority adjustment per-LWP, not per-process.
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>.
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!