tech-kern archive

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

Re: getiobuf(x, false) can sleep ?

Andrew Doran <> wrote:
> > This is concerning.  As mentioned, bufio_cache is interrupt safe (marked
> > with IPL_BIO) and locks at pool_cache(9) layer, also deeper layers e.g.
> > UVM kva-cache, should use spin-locks at IPL_VM.
> > 
> > There is one possibly related mysterious backtrace - PR/42611.  It looks
> > like mutex locked against oneself (via interrupt) on interrupt safe pool,
> > which suggests non-IPL_VM mutex use.  Quick code inspection did not reveal
> > anything suspicious, but there are many cache layers involved, and I did
> > not find enough time for a deep look yet.
> Re 42611 - can we add asserts such that pools are not used from
> hard/soft interrupt context unless marked with !IPL_NONE?  I wonder is
> the correct allocator being chosen for pool_cache if !IPL_NONE.

Yes, except the upper layers seemed correct to me.  I think sprinkling
asserts there and down to deeper layers would be useful.  Also, I was
thinking about periodical triggering of KVA reclamation mechanism for
DIAGNOSTIC kernels - it might expose bugs/regressions.  That code part
is rarely "hammered" on today's machines.


Home | Main Index | Thread Index | Old Index