Cc: Matt Mackall <mpm@...>, <linux-kernel@...>, <linux-mm@...>, Thomas Graf <tgraf@...>, David Miller <davem@...>, Andrew Morton <akpm@...>, Daniel Phillips <phillips@...>, Pekka Enberg <penberg@...>, Paul Jackson <pj@...>, <npiggin@...>
In an interrupt context we do not have a process context. But there is
no exemption from memory policy constraints.
Yes sure if we do not have a context then no restrictions originating
there can be enforced. So you want to restrict the logic now to
interrupt allocs? I.e. GFP_ATOMIC?
Correct. That is an optimization but it may be called anytime from the
perspective of an execution thread and that may cause problems with your
approach.
It will work with whatever was left behind in the case of SLUB and a
kmalloc alloc (optimization there). It wont if its SLAB (which is
stricter) or a kmalloc_node alloc. A kmalloc_node alloc will remove the
current cpuslab if its not on the right now.
If it finds no partial slab then it will go to the page allocator which
will allocate given the current contextual alloc constraints. In the case
of a memory policy we may have limited the allocations to a single node
where there is no escape (the zonelist does *not* contain zones of other
nodes). The only chance to bypass this is by only dealing with allocations
during interrupt that have no allocation context.
-