Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2017 11:37:15 +0800
From:      Sepherosa Ziehau <sepherosa@gmail.com>
To:        "Somayajulu, David" <David.Somayajulu@cavium.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: Question on taskqueue_drain
Message-ID:  <CAMOc5cxtSakeBhskbmfW4BxsbgdRDp22AVBYrDgReCP91YLY7g@mail.gmail.com>
In-Reply-To: <BY2PR07MB1474C78A241A7CA1F2396435EE180@BY2PR07MB1474.namprd07.prod.outlook.com>
References:  <BY2PR07MB14745123AC235B06BCD2987DEE190@BY2PR07MB1474.namprd07.prod.outlook.com> <BY2PR07MB1474C78A241A7CA1F2396435EE180@BY2PR07MB1474.namprd07.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 19, 2017 at 10:39 AM, Somayajulu, David
<David.Somayajulu@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.

Thanks,
sephe

-- 
Tomorrow Will Never Die



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