freebsd-skq/sys/conf
jhb 696704716d Implement preemption of kernel threads natively in the scheduler rather
than as one-off hacks in various other parts of the kernel:
- Add a function maybe_preempt() that is called from sched_add() to
  determine if a thread about to be added to a run queue should be
  preempted to directly.  If it is not safe to preempt or if the new
  thread does not have a high enough priority, then the function returns
  false and sched_add() adds the thread to the run queue.  If the thread
  should be preempted to but the current thread is in a nested critical
  section, then the flag TDF_OWEPREEMPT is set and the thread is added
  to the run queue.  Otherwise, mi_switch() is called immediately and the
  thread is never added to the run queue since it is switch to directly.
  When exiting an outermost critical section, if TDF_OWEPREEMPT is set,
  then clear it and call mi_switch() to perform the deferred preemption.
- Remove explicit preemption from ithread_schedule() as calling
  setrunqueue() now does all the correct work.  This also removes the
  do_switch argument from ithread_schedule().
- Do not use the manual preemption code in mtx_unlock if the architecture
  supports native preemption.
- Don't call mi_switch() in a loop during shutdown to give ithreads a
  chance to run if the architecture supports native preemption since
  the ithreads will just preempt DELAY().
- Don't call mi_switch() from the page zeroing idle thread for
  architectures that support native preemption as it is unnecessary.
- Native preemption is enabled on the same archs that supported ithread
  preemption, namely alpha, i386, and amd64.

This change should largely be a NOP for the default case as committed
except that we will do fewer context switches in a few cases and will
avoid the run queues completely when preempting.

Approved by:	scottl (with his re@ hat)
2004-07-02 20:21:44 +00:00
..
defines
files Introduce GEOM_LABEL class. 2004-07-02 19:40:36 +00:00
files.alpha Move uma_small_alloc() and uma_small_free() out of the pmap and into their 2004-06-11 19:55:56 +00:00
files.amd64 Move acpi_if.m to files.{amd64,i386,ia64}. This should fix the alpha build. 2004-06-30 14:19:28 +00:00
files.arm Remove libkern/mem* 2004-05-14 23:42:54 +00:00
files.i386 Move acpi_if.m to files.{amd64,i386,ia64}. This should fix the alpha build. 2004-06-30 14:19:28 +00:00
files.ia64 Move acpi_if.m to files.{amd64,i386,ia64}. This should fix the alpha build. 2004-06-30 14:19:28 +00:00
files.pc98 MFi386: revision 1.493. 2004-05-26 13:10:37 +00:00
files.powerpc Add an implementation of uiomove_fromphys() for PowerPC. This 2004-03-23 18:26:03 +00:00
files.sparc64 Add the esp(4) files. Two of them are sbus-specific and therefore only 2004-06-10 05:21:44 +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 We don't need GEN_M_CFILES. Fold it into GEN_CFILES definition and 2004-06-27 23:03:43 +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 Add acpi methods for HID/CID probing, evaluating objects, and walking the 2004-06-29 18:56:14 +00:00
ldscript.alpha Don't override the standard SYSTEM_LD setting from kern.pre.mk. 2004-02-13 12:28:53 +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 Fix the following error: 2004-06-20 22:32:19 +00:00
ldscript.powerpc
ldscript.sparc64 Use the same SEARCH_DIR as other platforms. 2003-06-07 18:23:50 +00:00
majors 1. Spell Cronyx Sigma-ISA and Cronyx Tau-ISA correctly. 2004-05-05 13:09:11 +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 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.amd64 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
Makefile.i386 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.ia64 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.pc98 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.powerpc Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.sparc64 Change required config(8) version. 2004-05-09 22:29:38 +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 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00
NOTES Implement preemption of kernel threads natively in the scheduler rather 2004-07-02 20:21:44 +00:00
options Implement preemption of kernel threads natively in the scheduler rather 2004-07-02 20:21:44 +00:00
options.alpha Add option NO_SIO to work-around the hardcoded dependency on sio(4). 2003-08-25 03:43:08 +00:00
options.amd64 MFp4: comment out options that don't exist so that they cannot be 2004-03-13 22:16:34 +00:00
options.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
options.i386 Remove isa compat stuff. 2004-03-14 23:03:57 +00:00
options.ia64 Add LOG2_ID_PAGE_SIZE to the mix of options on ia64. 2003-09-09 18:30:20 +00:00
options.pc98 MFi386: Add NETGRAPH_CRONYX. 2004-05-18 11:56:24 +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