Question on taskqueue_drain
Somayajulu, David
David.Somayajulu at cavium.com
Wed Apr 19 17:36:55 UTC 2017
Hans,
Thanks for the info.
> No sleeping functions like taskqueue_drain() can be called when the MTX_DEF lock is grabbed.
I am guessing this is true irrespective of whether the taskqueue is "fast" or not.
Thanks
David S.
-----Original Message-----
From: Hans Petter Selasky [mailto:hps at selasky.org]
Sent: Tuesday, April 18, 2017 9:22 PM
To: Sepherosa Ziehau <sepherosa at gmail.com>; Somayajulu, David <David.Somayajulu at cavium.com>
Cc: freebsd-net at freebsd.org
Subject: Re: Question on taskqueue_drain
On 04/19/17 05:37, Sepherosa Ziehau wrote:
> On Wed, Apr 19, 2017 at 10:39 AM, Somayajulu, David
> <David.Somayajulu at cavium.com> wrote:
>> Sorry what I meant to ask was, whether it is O.K to call taskqueue_drain(), when an MTX_DEF lock is grabbed prior to calling taskqueue_drain().
>>
>
> You will hit WITNESS, if the drain needs to wait; that's probably the
> best case. If the lock will be acquired in the task being drained,
> this leads to deadlock.
>
Hi,
No sleeping functions like taskqueue_drain() can be called when the MTX_DEF lock is grabbed.
--HPS
More information about the freebsd-net
mailing list