freebsd-dev/sys/pc98/pc98
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
..
30line.h
atapi.c Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
atapi.h
busio.s Include machine/asmacros.h instead of machine/asm.h. 2003-11-05 17:01:51 +00:00
busiosubr.c Implement the bus_space_map() function to allocate resources and initialize 2003-09-23 08:22:34 +00:00
canbepm.c
canbus_if.m
canbus.c Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
canbus.h
canbusvars.h
clock.c MFi386: revision 1.213. 2004-07-13 12:58:36 +00:00
epsonio.h
fd.c Merged from sys/dev/fdc/fdc.c revision 1.283. 2004-08-22 15:10:53 +00:00
fdc_cbus.c Merged from the following changes. 2004-07-17 10:07:19 +00:00
fdcvar.h Merged from the following changes. 2004-07-17 10:07:19 +00:00
fdreg.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
isa_dma.c MFi386: revision 1.16. 2004-07-08 13:48:49 +00:00
machdep.c Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
module.h
mse.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
nmi.c Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
olpt.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
pc98_machdep.c
pc98_machdep.h
pc98.h Remove obsolete defines. 2004-07-08 13:47:56 +00:00
pc98gdc.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
pc98kbd.c Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
pmc.c Add missing <sys/module.h> includes currently relying on nested include 2004-06-03 06:10:02 +00:00
ppc.c Add missing <sys/module.h> includes. 2004-06-07 06:04:27 +00:00
ppcreg.h
sc_machdep.h
scgdcrndr.c Add missing <sys/module.h> #includes 2004-06-04 13:04:10 +00:00
scterm-sck.c Add missing <sys/module.h> #includes 2004-06-04 13:04:10 +00:00
scvtbpc98.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sio_cbus.c Remove '#include <machine/bus_pio.h>'. This is meaningless. 2004-03-07 05:39:38 +00:00
sio.c Merged from sys/dev/sio/sio.c revision 1.450. 2004-07-24 15:13:42 +00:00
syscons_pc98.c Merged from sys/isa/syscons_isa.c revision 1.24. 2003-10-31 13:48:24 +00:00
wd_cd.c Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
wd_cd.h Restore CDIOCREADAUDIO ioctl. 2004-03-07 14:16:42 +00:00
wd.c Kill count device support from config. I've changed the last few 2004-08-30 23:03:58 +00:00
wdreg.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
wormio.h