Re: [patch 01/28] cpu alloc: The allocator

Christoph Lameter
2007-11-14T04:16:12Z

Hmmm.. I have v2 in preparation here that puts the pda and the per cpu
data into the cpu_alloc area. Thus gs: can be used to access all per cpu
data.

Any ideas how to abstract out the pda operations? Wasnt local_t supposed
to be able to do atomic ops on cpu data? Is there an segment register
version of local_t? I want also to have cmpxchg xchg etc that are all
atomic without requiring any interrupt disable or preempt disable.

cpu_alloc allows pointer arithmetic on cpu area pointers. The segment
prefix can then be used to select the appropriate area.

Guess I need also to add an arch configuration guide to V2 as well so that
the other arches can do similar tricks and emphasize that the static
default that requires bss is only suitable for small systems.