tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: crash in pipe_create()
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?)
enami.
Home |
Main Index |
Thread Index |
Old Index