Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2002 09:48:00 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, Andrew Kolchoogin <andrew@snark.rinet.ru>, current@FreeBSD.org
Subject:   Re: VOP_GETATTR panic on Alpha
Message-ID:  <XFMail.20020717094800.jhb@FreeBSD.org>
In-Reply-To: <20020717134948.G3565-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 17-Jul-2002 Bruce Evans wrote:
> On Tue, 16 Jul 2002, John Baldwin wrote:
> 
>> On 17-Jul-2002 Bruce Evans wrote:
>> >>         mtx_lock_spin(&sched_lock);
>> >>         if (cold || panicstr) {
>> >>                 /*
>> >>                  * After a panic, or during autoconfiguration,
>> >>                  * just give interrupts a chance, then just return;
>> >                           ^^^^^^^^^^^^^^^^^^^^^^^^
>> >
>> > This is the rotted comment.  No chance is given here.
>>
>> Well, when you unlock sched_lock you give ithreads a chance to run.  (This
>> is only true in a fully preemptive kernel though.)
> 
> It now only releases the lock that it aquired.  splx(safepri) gave a
> nesting-violating unlocking corresponding to releasing the caller(s)
> locks.  However, it is probably a bug to call msleep() with sched_lock
> held, so releasing sched_lock would release it completely but not give
> interrupts any better chance than they had to begin with.

Well, the only other locks the caller can hold is the mutex passed in
and we also release that as well, which could free up ithreads blocked
on that lock.

> Bruce

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020717094800.jhb>