Re: [PATCH] NUMA slab allocator migration bugfix

From: Christoph Lameter
Date: Wed Mar 05 2008 - 18:08:32 EST


On Wed, 5 Mar 2008, Joe Korty wrote:

> The NUMA slab allocator (specifically, cache_alloc_refill)
> is not refreshing its local copies of what cpu and what
> numa node it is on, when it drops and reacquires the irq
> block that it inherited from its caller. As a result
> those values become invalid if an attempt to migrate the
> process to another numa node occured while the irq block
> had been dropped.

The new slab is allocated for the node that was determined earlier and
entered into the slab queues for that node. Howver, during the alloc we
were rescheduled.

Then we find ourselves on another processor and recalculate the ac
pointer. If we now retry then there is the danger of getting off node
objects into the per cpu queue. Which may cause the wrong lock to be taken
when draining queues. Sucks because it can cause data corruption. Same as
the other issues resolved by GFP_THISNODE.

Acked-by: Christoph Lameter <clameter@xxxxxxx>

Will queue it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/