From: Christoph Lameter > On Friday 18 November 2005 02:51, Christoph Lameter wrote: > > This patch fixes a regression in 2.6.14 against 2.6.13 that causes an > > imbalance in memory allocation during bootup. > > I still think it's wrongly implemented. We shouldn't be slowing down the slab > fast path for this. Also BTW if anything your check would need to be > dependent on !in_interrupt(), otherwise the policy of slab allocations > in interrupt context will change randomly based on what the current > process is doing (that's wrong, interrupts should be always local) > But of course that would make the fast path even slower ... We can add that check to slab_node() to avoid these issues and it will be out of the fast path then. I would like to hear about alternatives to this. You really want to run the useless fastpath? Examine lists etc for the local node despite the policy telling you to get off node? Signed-off-by: Andrew Morton --- mm/mempolicy.c | 3 +++ 1 files changed, 3 insertions(+) diff -puN mm/mempolicy.c~numa-policies-in-the-slab-allocator-v2-fix mm/mempolicy.c --- devel/mm/mempolicy.c~numa-policies-in-the-slab-allocator-v2-fix 2005-11-17 19:59:06.000000000 -0800 +++ devel-akpm/mm/mempolicy.c 2005-11-17 19:59:06.000000000 -0800 @@ -774,6 +774,9 @@ static unsigned interleave_nodes(struct */ unsigned slab_node(struct mempolicy *policy) { + if (in_interrupt()) + return numa_node_id(); + switch (policy->policy) { case MPOL_INTERLEAVE: return interleave_nodes(policy); _