Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 09:41:43 -0700
From:      Maksim Yevmenkin <myevmenk@exodus.net>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        "M. Warner Losh" <imp@bsdimp.com>, hackers@FreeBSD.ORG
Subject:   Re: Fast interrupts
Message-ID:  <3D6A5A47.57672729@exodus.net>
References:  <XFMail.20020826112635.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> On 26-Aug-2002 M. Warner Losh wrote:
> > can you call wakeup(9) from a fast interrupt handler?  

[ ...]

> > The only reason I ask is because sio seems to go out of its way to
> > schedule a soft interrupt to deal with waking up processes, which then
> > calls wakeup...
> 
> Since wakeup only needs a spin lock, it is probably ok.  You just can't call
> anything that would sleep (in any interrupt handler) or block on a non-spin
> mutex.

what is the general locking technique for interrupt handlers?
there must be some sort of locking, right?

man atomic(9) says that current set of atomic operations do not
necessarily guarantee atomicity across multiple processors.

man mutex(9) says that MTX_DEF mutexes _might_ spin for some
amount of time. but it is _only_ a machine specific optimization.

MTX_SPIN are not recomended (correct me if i wrong). WITNESS
gets upset when it finds "unlisted" MTX_SPIN mutex.

for example NIC drivers call ether_input() from interrupt handlers
which uses mutex to lock input queue. does that mean interrupt
handler can/should use MTX_DEF mutex in this case? 

thanks,
max

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D6A5A47.57672729>