Messages in this thread | | | Date | Fri, 6 Nov 2009 12:03:55 -0500 (EST) | From | Christoph Lameter <> | Subject | Re: irq lock inversion |
| |
On Sat, 7 Nov 2009, Tejun Heo wrote:
> vmalloc/vfree is an allocator in the kernel and can't be called from > irq context and doesn't take gfp flags. percpu allocator being > dependent on vmalloc area, it's gonna be a bit tricky. It's > definitely doable but I'm still not quite sure whether the benfit > would worth the added complexity. The only known use case is for lazy > allocation from memory allocator, right? How much does it hurt not to > have that lazy allocation?
Nick did some work recently on the vmalloc subsystem and one of the intents was (well I think so at least) to make it usable for fsblock which requires virtual mappings. Maybe even from an atomic context.
Potential use cases for atomic percpu allocs exist all over the kernel. If you need to allocate a structure in an atomic context then attaching per cpu information to that structure will require also per cpu allocation in an atomic context.
We discourage atomic allocations and they are rare. Atomic allocs are allowed to fail. But they are occasionally necessary.
| |