HEADSUP: Sleep queues added to kernel, so be careful.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 27 Feb 2004 14:01:30 -0500
On Friday 27 February 2004 01:52 pm, John Baldwin wrote:
> jhb         2004/02/27 10:52:44 PST
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/conf             files
>     sys/ddb              db_ps.c
>     sys/kern             kern_condvar.c kern_sig.c kern_synch.c
>                          kern_thread.c sched_4bsd.c sched_ule.c
>                          sys_generic.c vfs_subr.c
>     sys/sys              condvar.h proc.h sched.h systm.h
>   Log:
>   Switch the sleep/wakeup and condition variable implementations to use the
>   sleep queue interface:

There should be little user-visible effect from this change.  Under load one 
can trigger a new diagnostic message (soon to become an assertion, but it's a 
diagnostic for now) about mismatches of msleep() wait channels and lock 
pointers.  The one case I have seen is that vm_page_sleep_if_busy() triggers 
a diagnostic as it sleeps on a vm_page * while holding the page queues mutex 
but some other thread is already sleeping on that address while holding no 
lock (implicitly using Giant for synchronization).  If you do get any weird 
crashes, be sure to turn on INVARIANTS and WITNESS (with spin mutex checking 
on, i.e. no WITNESS_SKIPSPIN) to see if you can get a less obscure panic 
message.  All of the bugs I found during testing were found by INVARIANTS + 
WITNESS and when found in that manner they are a lot easier to locate and 
fix.  Thanks.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Fri Feb 27 2004 - 10:00:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:44 UTC