freebsd-nq/sys/conf
Julian Elischer ed062c8d66 Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.

The KSE structure has become the same as the "per thread scheduler
private data" structure. In order to not make the diffs too great
one is #defined as the other at this time.

The KSE (or td_sched) structure is  now allocated per thread and has no
allocation code of its own.

Concurrency for a KSEGRP is now kept track of via a simple pair of counters
rather than using KSE structures as tokens.

Since the KSE structure is different in each scheduler, kern_switch.c
is now included at the end of each scheduler. Nothing outside the
scheduler knows the contents of the KSE (aka td_sched) structure.

The fields in the ksegrp structure that are to do with the scheduler's
queueing mechanisms are now moved to the kg_sched structure.
(per ksegrp scheduler private data structure). In other words how the
scheduler queues and keeps track of threads is no-one's business except
the scheduler's. This should allow people to write experimental
schedulers with completely different internal structuring.

A scheduler call sched_set_concurrency(kg, N) has been added that
notifies teh scheduler that no more than N threads from that ksegrp
should be allowed to be on concurrently scheduled. This is also
used to enforce 'fainess' at this time so that a ksegrp with
10000 threads can not swamp a the run queue and force out a process
with 1 thread, since the current code will not set the concurrency above
NCPU, and both schedulers will not allow more than that many
onto the system run queue at a time. Each scheduler should eventualy develop
their own methods to do this now that they are effectively separated.

Rejig libthr's kernel interface to follow the same code paths as
linkse for scope system threads. This has slightly hurt libthr's performance
but I will work to recover as much of it as I can.

Thread exit code has been cleaned up greatly.
exit and exec code now transitions a process back to
'standard non-threaded mode' before taking the next step.
Reviewed by:	scottl, peter
MFC after:	1 week
2004-09-05 02:09:54 +00:00
..
defines
files Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
files.alpha Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
files.amd64 Add the mp_watchdog hooks, although it locks up my SMP test box. It might 2004-08-30 23:33:33 +00:00
files.arm Remove libkern/mem* 2004-05-14 23:42:54 +00:00
files.i386 AMD64 on-CPU GART support. 2004-08-16 12:25:48 +00:00
files.ia64 Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It must 2004-08-16 18:54:23 +00:00
files.pc98 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
files.powerpc Add /dev/mem and /dev/kmem to powerpc. 2004-08-16 13:07:40 +00:00
files.sparc64 Add a kludge for building SBus-only kernels, i.e. kernels without support 2004-08-15 22:59:34 +00:00
kern.mk Define INLINE_LIMIT for arm. 2004-05-14 13:35:46 +00:00
kern.post.mk We don't need GEN_M_CFILES. Fold it into GEN_CFILES definition and 2004-06-27 23:03:43 +00:00
kern.pre.mk Removed COPTS support from kmod.mk and kern.pre.mk. 2004-08-13 14:30:26 +00:00
kmod_syms.awk Our awk does not implement the ARGIND variable, so we were attempting 2002-08-06 19:31:04 +00:00
kmod.mk Unconditionally add `-fno-omit-frame-pointer' to CFLAGS when building 2004-08-29 02:00:50 +00:00
ldscript.alpha Have the linker provide the btext symbol when referenced. This is needed 2004-08-27 19:13:35 +00:00
ldscript.amd64 Provide the _start_ctors and _stop_ctors symbols. As on i386, the addresses 2004-05-29 01:09:00 +00:00
ldscript.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
ldscript.i386 Align the .ctors section correctly. 2003-12-03 07:40:03 +00:00
ldscript.ia64 Have the linker provide btext. It's used for profiling. 2004-08-25 07:43:28 +00:00
ldscript.powerpc
ldscript.sparc64 Use the same SEARCH_DIR as other platforms. 2003-06-07 18:23:50 +00:00
majors General modernization of coda: 2004-09-01 01:19:52 +00:00
majors.awk Add necessary awk magic to create a table of major numbers allocated 2003-02-27 08:52:11 +00:00
Makefile.alpha Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.amd64 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.arm Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.i386 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.ia64 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.pc98 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.powerpc Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
Makefile.sparc64 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
makeLINT.mk Implemented "nooption" and "nomakeoption" config(8) tokens. 2003-02-26 23:36:59 +00:00
makeLINT.sed Implemented "nooption" and "nomakeoption" config(8) tokens. 2003-02-26 23:36:59 +00:00
newvers.sh HEAD is now 6-CURRENT 2004-08-18 00:21:12 +00:00
NOTES Fixed more spacing bugs. 2004-09-03 06:32:11 +00:00
options Hook autofs to the build. 2004-09-02 20:44:56 +00:00
options.alpha Update for the KDB framework. Sanitize the alpha console code now that 2004-07-10 22:29:41 +00:00
options.amd64 Add the mp_watchdog hooks, although it locks up my SMP test box. It might 2004-08-30 23:33:33 +00:00
options.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
options.i386 Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
options.ia64 Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It must 2004-08-16 18:54:23 +00:00
options.pc98 Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
options.powerpc Catch up with sparc64 OFWCONS_POLL_HZ change 2004-06-25 13:44:34 +00:00
options.sparc64 Better OFW console support on Sun Ultra2 machines. 2004-06-24 02:57:11 +00:00
systags.sh Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00