freebsd-nq/sys/vm
John Baldwin c86b6ff551 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
..
default_pager.c
device_pager.c
phys_pager.c
pmap.h
swap_pager.c Don't use an uninitialized field reserved for callers in the bio structure 2001-10-15 23:02:54 +00:00
swap_pager.h
vm_contig.c contigmalloc1() could cause the vm_page_zero_count to become incorrect. 2001-10-17 17:34:34 +00:00
vm_extern.h Move the code that computes the system load average from vm_meter.c 2001-10-20 13:10:43 +00:00
vm_fault.c Fix deadlock introduced in 1.73 (Jan 1998). The paging-in-progress count 2001-11-09 21:34:45 +00:00
vm_glue.c Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
vm_init.c
vm_kern.c vm/vm_kern.c: rate limit (to once per second) diagnostic printf when 2001-12-01 00:21:30 +00:00
vm_kern.h
vm_map.c Don't let pmap_object_init_pt() exhaust all available free pages 2001-10-31 03:06:33 +00:00
vm_map.h Don't let pmap_object_init_pt() exhaust all available free pages 2001-10-31 03:06:33 +00:00
vm_meter.c Move the code that computes the system load average from vm_meter.c 2001-10-20 13:10:43 +00:00
vm_mmap.c
vm_object.c Move recently added procedure which was incorrectly placed within an 2001-10-26 16:27:54 +00:00
vm_object.h Implement kern.maxvnodes. adjusting kern.maxvnodes now actually has a 2001-10-26 00:08:05 +00:00
vm_page.c This fixes a large number of bugs in our NFS client side code. A recent 2001-12-14 01:16:57 +00:00
vm_page.h
vm_pageout.c Fix a BUF_TIMELOCK race against BUF_LOCK and fix a deadlock in vget() 2001-12-20 22:42:27 +00:00
vm_pageout.h
vm_pageq.c
vm_pager.c
vm_pager.h
vm_param.h
vm_swap.c
vm_unix.c
vm_zeroidle.c
vm_zone.c When laying out objects in a ZONE_INTERRUPT zone, allow them to cross 2001-11-17 00:40:48 +00:00
vm_zone.h
vm.h
vnode_pager.c This fixes a large number of bugs in our NFS client side code. A recent 2001-12-14 01:16:57 +00:00
vnode_pager.h