Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2013 12:20:16 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Orit Moskovich <oritm@mellanox.com>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: FreeBSD spinlock - compatibility layer
Message-ID:  <201305211220.16776.jhb@freebsd.org>
In-Reply-To: <981733489AB3BD4DB24B48340F53E0A55B0D091F@MTLDAG01.mtl.com>
References:  <981733489AB3BD4DB24B48340F53E0A55B0CFD79@MTLDAG01.mtl.com> <201305200950.26834.jhb@freebsd.org> <981733489AB3BD4DB24B48340F53E0A55B0D091F@MTLDAG01.mtl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, May 21, 2013 12:36:38 am Orit Moskovich wrote:
> That's not the case when using taskqueues for deferring  execution of an 
interrupt handler.
> Tasks can be delayed using the global taskqueue taskqueue_swi, which 
executes its tasks in the context of an interrupt.
> In this case sleep is forbidden, and using spin mutex is not (although might 
be not recommended).

No, swi's run in an interrupt thread, and interrupt threads can use regular 
mutexes.  (That is why they run in a thread context.)  The only way you can 
run in a context requiring a spin lock in a driver is to use an interrupt 
filter.

-- 
John Baldwin



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