Re: irq lock inversion

From: Christoph Lameter
Date: Fri Nov 06 2009 - 12:05:46 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at