freebsd-nq/lib/libkvm
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
..
kvm_alpha.c
kvm_amd64.c Implement crashdump decoding for AMD64 as well, now that I have finally 2004-05-19 18:24:13 +00:00
kvm_arm.c Import libkvm MD file for arm. 2004-05-14 12:24:03 +00:00
kvm_file.c Remove unnecssary <vm/swap_pager.h> includes. 2003-07-31 21:44:31 +00:00
kvm_geterr.3
kvm_getfiles.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm_getloadavg.3
kvm_getloadavg.c Include sys/param.h instead of sys/types.h to get the definition of the 2001-11-20 08:26:37 +00:00
kvm_getprocs.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm_getswapinfo.3 Expand the license referenced indirectly inline. 2004-07-31 18:49:53 +00:00
kvm_getswapinfo.c Expand the license referenced indirectly inline. 2004-07-31 18:49:53 +00:00
kvm_i386.c
kvm_ia64.c Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
kvm_nlist.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm_open.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm_powerpc.c Stub out _kvm_mdopen, we don't the same constants as NetBSD 2002-05-15 09:56:40 +00:00
kvm_private.h Remove multi-line __P() usage. 2002-03-22 09:22:15 +00:00
kvm_proc.c Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
kvm_read.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm_sparc64.c Teach libkvm to deal with direct mapped addresses. 2002-12-27 01:45:05 +00:00
kvm_sparc.c Remove 'register' keyword. 2002-03-21 23:39:28 +00:00
kvm.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kvm.c Avoid assignments to cast expressions. 2004-06-08 13:08:19 +00:00
kvm.h Fixed some style bugs in the removal of __P(()). Blind removal of 2003-10-13 04:44:55 +00:00
Makefile style.Makefile(5) 2003-08-18 15:25:39 +00:00