tech-kern archive

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

Re: low memory problem - pool calls vmem calls uvm calls pool etc.

On 04/12/13 01:07, Lars Heidieker wrote:
The recursion happened due to freeing to the wrong arena. Take a look at the pool_allocator_meta and how vmem recurses. It's one vmem arena (kmem_va_arena) using quantum caches and one (actually two kmem_meta_arena(s) stacked on top of kmem_meta_arena) for meta allocations eg pool_allocator_meta those arenas are stacked up on one arena without quatum caching (kmem_arena). So "normal" allocations utilized this cache, but no pool_caches are involved for "meta" allocations. So it might recurse once while switching to allocate via the kmem_meta_arena and from there on no pool_caches are involved. Allocations via vmem_alloc must be freed via vmem_free and vmem_xalloc via vmem_xfree mixing them, at least with quantum caches involved, will lead to inconsistencies.

It occurs to me that disabling the quantum cache on the meta arenas may be specifically to avoid this problem. But this problem could also, I think, be resolved by ensuring that quantum caching is inhibited in vmem_free's in, and only in, ENOMEM paths. Then quantum caching could be used for meta arenas too.

Is it worth going to that effort?  Would it be much of a win?

Home | Main Index | Thread Index | Old Index