tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Reclaiming vnodes

On Tue, Sep 15, 2009 at 06:21:36PM +0100, David Laight wrote:
> You still have a potential deadlock - or at least a failure if
> getnewvnode() cannot actually return a new vnode because none are
> free at the exact moment of the allocate request.
> You can't sleep awaiting vnodes because that will deadlock against
> the reclaim thread, so a system that is cycling vnodes very quickly
> will fail during the allocate.

This is what I was trying to get at when we discussed this privately
a few weeks ago -- to me it seems like we're just moving the problem
around, allowing two threads to deadlock against each other instead
of allowing one thread to sleep where it shouldn't.

> I suspect the only real answer is to get a new vnode while the code
> can still sleep - and free it as unused if it wasn't actually wanted.

I am sorely familiar with this problem from allocations in the
cryptodev code.  It's what we had to do in a number of cases there (no,
not for vnodes, but YKWIM).


Home | Main Index | Thread Index | Old Index