tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: crash in pipe_create()
On Tue, Feb 10, 2009 at 07:23:26PM +0900, enami tsugutomo wrote:
> Andrew Doran <ad%netbsd.org@localhost> writes:
>
> > I think it would be
> > good for pool_cache_get() to invalidate the pool_cache if it cannot fetch
> > an item from the pool. This would flush per-CPU caches back to the pool.
> >
> > item = pool_get(&pc->pc_pool, PR_NOWAIT);
> > if (__predict_false(item == NULL) && (flags & PR_WAITOK) != 0) {
> > mutex_enter(&pc->pc_lock);
> > inv = ratecheck(&pc->pc_invaltime, &pool_cache_invaltime);
> > mutex_exit(&pc->pc_lock);
> > if (inv) {
> > pool_cache_invalidate(pc);
> > }
> > item = pool_get(&pc->pc_pool, PR_WAITOK);
> > }
>
> Sounds cool. (But pool_cache_invalidate() doesn't invalidate per CPU
> cache does it?)
Ah right, I had forgotten. It was done that way to satisfy the requirements
of the existing callers. It could be made to invalidate per-CPU caches.
There are only two calls left in the kernel:
- The x86 pmap no longer needs the call.
- The alpha pmap's usage appears broken. At a glance it seems to assume a
non-preemptive non-MP kernel, i.e. that pool_cache_invalidate is part
of a greater atomic unit of work (pmap_growkernel).
Andrew
Home |
Main Index |
Thread Index |
Old Index