Re: [patch 0/6] mm: alloc_percpu and bigrefs

From: Christoph Lameter
Date: Fri Sep 23 2005 - 14:16:57 EST


On Fri, 23 Sep 2005, Andrew Morton wrote:

> big deal. Given that alloc_percpu() is already numa-aware, is that extra
> cross-node fetch and pointer hop really worth all that new code? The new
> version will have to do a tlb load (including a cross-node fetch)
> approximately as often as the old version will get a CPU cache miss on the
> percpu array, maybe?

The current alloc_percpu() is problematic because it has to allocate
entries for all cpus even those who are not online yet. There is no way to
track alloc_percpu entries and therefore no possibility of adding an entry
for a processor if one comes online or for removing one when a processor
goes away.

An additional complication is the allocation of per cpu entries for
processors whose memory node are not online. The current
implementation will fall back on a unspecific allocation but this means
that the placement of the per cpu entries will not be on the node of the
processor!
-
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/