freebsd-dev/lib
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
..
compat Update with the 4.9 pam modules, and add pam_opieaccess.so to the mix. 2003-12-07 03:02:27 +00:00
csu Back out the call to _init_tls() - something is broken there and it 2004-08-21 08:22:00 +00:00
libalias Fix outgoing ICMP on global instance. 2004-08-14 14:21:09 +00:00
libarchive Some old tar archives rely on "regular-file-plus-trailing-slash" to 2004-09-04 21:49:42 +00:00
libatm Use WARNS?=3 for these in the arm case for now, due to toolchain issues. 2004-05-14 13:31:21 +00:00
libautofs Normalize the makefile. 2004-09-03 18:01:34 +00:00
libbind
libbluetooth Unbreak a whatis(1) entry by fixing the NAME section. 2004-07-05 16:32:30 +00:00
libbsnmp Link to the build again. The problem was that we need a new 2004-08-11 16:47:12 +00:00
libbz2 Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
libc Unbreak memmove(). Return the dst argument. While here, fix the END 2004-09-04 00:23:15 +00:00
libc_r Avoid using void pointers in additive expressions. 2004-08-14 17:46:10 +00:00
libcalendar Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libcam Change a couple of comments so that GCC doesn't think that they contain 2004-07-29 15:35:45 +00:00
libcom_err
libcompat Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libcrypt Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libdevinfo Enclose .Fa fn with ``The ... function'' at the beginning of sentences. 2004-07-26 19:35:20 +00:00
libdevstat Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libdisk Don't use type unknown for partitions that we don't care about because 2004-08-05 17:44:07 +00:00
libedit mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
libexpat Stage 3 of dynamic root support. Make all the libraries needed to run 2003-08-17 08:28:46 +00:00
libfetch Don't forget to allocate space for the terminating NUL when converting to 2004-08-07 20:23:50 +00:00
libform Use 2003-06-06 13:46:55 +00:00
libftpio Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libgeom Markup, grammar, punctuation. 2004-07-01 18:20:57 +00:00
libio Remove now redundant and now conflicting declaration of sysarch(2). 2004-01-10 18:37:11 +00:00
libipsec Back out last delta, it just unpolitely reverted some local changes. 2004-07-01 17:13:15 +00:00
libipx Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libisc Fix the #include part of the SYNOPSIS for heap.3 2003-06-17 08:43:19 +00:00
libkiconv Markup fixes. 2004-07-05 06:59:17 +00:00
libkse Add missing brackets. It was committed from wrong tree. 2004-08-26 02:41:01 +00:00
libkvm Refactor a bunch of scheduler code to give basically the same behaviour 2004-09-05 02:09:54 +00:00
libmagic Don't try to programatically support running file(1) w/in /usr/obj or other 2004-08-09 11:05:09 +00:00
libmd Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
libmenu Use 2003-06-06 13:46:55 +00:00
libmilter Honor NOINET6 and disable IPv6 support in libmilter and sendmail if it 2004-06-01 01:29:42 +00:00
libmp Downgrage WARNS level for GCC 3.4.x. 2004-07-28 05:44:07 +00:00
libncp Avoid casts as lvalues. 2004-07-28 05:44:52 +00:00
libncurses Unbreak the NOINSTALLLIB install. 2003-08-30 13:57:31 +00:00
libnetgraph Yes, NgRecvAsciiMsg has the same results as NgRecvAsciiMsg, but it's 2004-07-04 04:03:37 +00:00
libngatm Add the new call control layer to the library and install the man page 2004-07-08 17:09:55 +00:00
libopie Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
libpam Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
libpanel Use 2003-06-06 13:46:55 +00:00
libpcap Merge of libpcap 0.8.3 from tcpdump.org. 2004-03-31 09:15:09 +00:00
libpthread Add missing brackets. It was committed from wrong tree. 2004-08-26 02:41:01 +00:00
libradius Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
librpcsvc clnt_call takes args of type xdrproc_t. 2003-10-26 03:43:35 +00:00
libsbuf style.Makefile(5) 2003-08-18 15:25:39 +00:00
libsdp Make whatis(1) happy about the NAME section. 2004-07-05 17:38:08 +00:00
libsm Reflect changes in sendmail 8.13 source tree 2004-08-01 01:16:59 +00:00
libsmb
libsmdb Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
libsmutil Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
libstand Reset the seek pointer to 0 when a file is successfully opened, 2004-09-04 14:54:01 +00:00
libtacplus Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libtelnet Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
libthr Adjust code to support AMD64, on AMD64, thread needs to set fsbase by 2004-08-19 23:49:04 +00:00
libthread_db Plug a memory leak in error case. 2004-08-16 05:20:12 +00:00
libufs Markup fixes. 2004-07-05 06:53:34 +00:00
libugidfw Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libusbhid Add __BEGIN_DECLS / __END_DECLS so this can be used in C++ code. 2004-06-03 15:04:24 +00:00
libutil Document when this function came into FreeBSD. 2004-08-21 03:31:17 +00:00
libvgl Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
libwrap Turn on the extended syntax, which TCP_wrappers has by default, as 2003-07-24 19:58:56 +00:00
libxpg4 Mark libxpg4 as OBSOLETE_IN_6: it has been empty since its contents 2003-06-13 07:21:37 +00:00
liby Include <stdlib.h> for exit() and add a prototype for yyparse(). 2004-05-24 09:50:57 +00:00
libypclnt Nothing in libypclnt depends on librpcsvc. 2004-02-04 09:53:29 +00:00
libz Correct a denial-of-service vulnerability in zlib. 2004-08-26 19:37:06 +00:00
msun Add man pages for the cimag(), conj() and creal() functions. 2004-08-07 23:03:36 +00:00
ncurses Unbreak the NOINSTALLLIB install. 2003-08-30 13:57:31 +00:00
Makefile Hook libautofs to the build. 2004-09-03 17:39:00 +00:00
Makefile.inc