freebsd-skq/sys/conf
peter 46969da5f8 Commit a partial lazy thread switch mechanism for i386. it isn't as lazy
as it could be and can do with some more cleanup.  Currently its under
options LAZY_SWITCH.  What this does is avoid %cr3 reloads for short
context switches that do not involve another user process.  ie: we can
take an interrupt, switch to a kthread and return to the user without
explicitly flushing the tlb.  However, this isn't as exciting as it could
be, the interrupt overhead is still high and too much blocks on Giant
still.  There are some debug sysctls, for stats and for an on/off switch.

The main problem with doing this has been "what if the process that you're
running on exits while we're borrowing its address space?" - in this case
we use an IPI to give it a kick when we're about to reclaim the pmap.

Its not compiled in unless you add the LAZY_SWITCH option.  I want to fix a
few more things and get some more feedback before turning it on by default.

This is NOT a replacement for Bosko's lazy interrupt stuff.  This was more
meant for the kthread case, while his was for interrupts.  Mine helps a
little for interrupts, but his helps a lot more.

The stats are enabled with options SWTCH_OPTIM_STATS - this has been a
pseudo-option for years, I just added a bunch of stuff to it.

One non-trivial change was to select a new thread before calling
cpu_switch() in the first place.  This allows us to catch the silly
case of doing a cpu_switch() to the current process.  This happens
uncomfortably often.  This simplifies a bit of the asm code in cpu_switch
(no longer have to call choosethread() in the middle).  This has been
implemented on i386 and (thanks to jake) sparc64.  The others will come
soon.  This is actually seperate to the lazy switch stuff.

Glanced at by:  jake, jhb
2003-04-02 23:53:30 +00:00
..
defines
files - Add the kern_umtx.c file to the build. 2003-04-01 01:13:29 +00:00
files.alpha Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
files.amd64 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
files.i386 - Consolidate smapi driver. 2003-03-24 19:40:54 +00:00
files.ia64 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
files.pc98 Merge PC98 support. 2003-03-25 05:19:18 +00:00
files.powerpc Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
files.sparc64 - Remove unused cache flushing routines. These will not necessary work 2003-03-19 06:55:37 +00:00
kern.mk Sync with bsd.kern.mk. 2003-02-28 06:49:59 +00:00
kern.post.mk Leave the `clobber' target alone, it clobbers too much (including 2003-03-03 09:35:44 +00:00
kern.pre.mk Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +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 exists() is too aggressive when searching for files without a full path. 2003-03-03 22:51:22 +00:00
ldscript.alpha Use the new freebsd output format from Binutils 2.13.1. 2002-10-11 19:38:04 +00:00
ldscript.amd64 Add two symbols start_ctors and stop_ctors to allow us to find the 2003-01-06 07:37:15 +00:00
ldscript.i386 Add two symbols start_ctors and stop_ctors to allow us to find the 2003-01-06 07:37:15 +00:00
ldscript.ia64 Back out rev 1.7 -- I'm not sure we're ready for it and I can't test it. 2002-12-05 18:35:44 +00:00
ldscript.powerpc
ldscript.sparc64
majors Note that MAJOR_AUTO is now the default if d_maj is not initialized. This 2003-03-09 11:03:45 +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 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.amd64 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.i386 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.ia64 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.pc98 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.powerpc Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +00:00
Makefile.sparc64 Standardize handling of locore.[sS] etc. files. 2003-02-28 21:59:14 +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 HEAD reverts to 5.0-CURRENT 2002-12-13 08:47:15 +00:00
NOTES Add MBUF_FRAG_TEST to NOTES. 2003-03-29 05:46:34 +00:00
options Add support for reading directly from file to userland buffer when the 2003-03-26 23:40:42 +00:00
options.alpha Move SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME into the MI options file, since 2002-11-18 06:17:07 +00:00
options.amd64 Move SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME into the MI options file, since 2002-11-18 06:17:07 +00:00
options.i386 Commit a partial lazy thread switch mechanism for i386. it isn't as lazy 2003-04-02 23:53:30 +00:00
options.ia64 Add ITANIUM2 as a global option. 2002-11-24 19:50:15 +00:00
options.pc98 Nuke options HTT infavor of machdep.hlt_logical_cpus tunable/sysctl. 2003-03-26 19:49:34 +00:00
options.powerpc Not all cpus are MPC750s. Replace the MPC750 cpu option with OEA. This 2003-02-05 11:37:59 +00:00
options.sparc64 Move SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME into the MI options file, since 2002-11-18 06:17:07 +00:00
systags.sh $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00