Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2003 14:21:14 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Aniruddha Bohra <bohra@cs.rutgers.edu>
Cc:        freebsd-smp@freebsd.org
Subject:   Re: Question about interrupt threads
Message-ID:  <XFMail.20030424142114.jhb@FreeBSD.org>
In-Reply-To: <3EA72A0B.5000606@cs.rutgers.edu>

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

On 24-Apr-2003 Aniruddha Bohra wrote:
> Hello
>     Thanks for your answer. I have some questions though
> 
>>>   My question is after all subsystems that lock giant are made
>>>INTR_MPSAFE will the implementation go back to non-process
>>>context interrupt handling (as in older versions) ?
>>>    
>>>
>>
>>I would like that, but don't see how it could work right.
>>  
>>
> Provided all ISRs spin on their locks, and do not sleep, we can assume the
> critical section to be small enough as to not allow interrupt handlers 
> on other CPUs
> to spin for a long time. Then, the problem does go away. Or am I missing
> something important here ? Understandably while there is a GIANT lock
> protecting ISRs, this is not possible.

Our default mutex locks are not spin-only.  Instead, when a thread
contends for a lock, it is suspended.  It's priority is propagated to
the holder of the lock, and the thread will resume when the lock is
released.  In order to not suspend the thread that got interrupted, we
give each interrupt source it's own thread context to execute its
handlers in.

-- 

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



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