[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: getiobuf(x, false) can sleep ?
On Sun, Apr 04, 2010 at 11:46:54PM +0100, Mindaugas Rasiukevicius wrote:
> Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> > > >
> > > > The mutex_enter() in the pool_cache_get_slow()?
> > >
> > > This cache won't sleep if PR_NOWAIT, it's interrupt safe.
> > >
> > > <...>
> > I've been running with the attached patch for a day now (the workaround
> > for bp changing under us was already there for a couple days), and the
> > "dkstart: preemption occured" printf fired twice. I didn't do the
> > kpreempt_disable()/kpreempt_enable() because the code is running
> > with the kernel_lock and at splbio(), so kernel preemption should already
> > be disabled (if it's not it's a problem). <...>
> 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.
Main Index |
Thread Index |