freebsd-skq/sys/ddb
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
..
db_access.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_access.h
db_break.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_break.h Revert previous and move the prototype for db_alt_break to ddb.h. 2002-12-31 18:30:53 +00:00
db_command.c Oops... Add the CS_OWN flag to the trace and where commands so that 2004-07-21 05:55:51 +00:00
db_command.h
db_examine.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
db_expr.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
db_input.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
db_lex.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
db_lex.h
db_main.c Damage control. Correcly advance symtab and strtab pointers, not 2004-07-28 08:59:08 +00:00
db_output.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_output.h
db_print.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_ps.c Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
db_run.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_sym.c Add DDB_NUMSYM option which in addition to the symbolic representation 2004-02-24 22:51:42 +00:00
db_sym.h
db_thread.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_variables.c Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_variables.h Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
db_watch.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
db_watch.h
db_write_cmd.c Use __FBSDID(). 2003-06-10 22:09:23 +00:00
ddb.h Unify db_stack_trace_cmd(). All it did was look up the thread given 2004-07-21 05:07:09 +00:00