Get rid of some old cruft and add a failsafe for M_WAITOK which guarentees
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 14 Feb 2004 20:02:28 +0000 (20:02 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 14 Feb 2004 20:02:28 +0000 (20:02 +0000)
commitfe1e98d0a1f548537daac5c08ef234699b263e8f
tree43a38304fc47b7efd939ce9bcb7b595483af9030
parent1870e334efbb6528bb71264f596185d4647c7073
Get rid of some old cruft and add a failsafe for M_WAITOK which guarentees
that malloc() will not attempt to reuse pages from the VM page cache if
called with M_WAITOK from a preemption.

If M_WAITOK is used in a malloc called from a preemption, and we would block,
do an initial yield instead of blocking.  This does not effect sequencing
of the preemption since either will cause the preemption to return and the
blocking thread to be scheduled normally, but yield as a first go will get
the cpu back more quickly.
sys/kern/kern_slaballoc.c