Re: [GIT PATCH] x86,percpu: fix pageattr handling with remap allocator

Suresh Siddha
2009-05-18T19:22:52Z

On Sat, 2009-05-16 at 18:23 -0700, Tejun Heo wrote:
> Units in
> a single chunk should be contiguous and of the same size such that
> unit_addr_for_cpu_N == chunk_addr + N * unit_size whereas chunks don't
> need to have any special address relation to other chunks.

And the size of the unit is same across chunks.

This is what I was missing :)

Can we don't use PERCPU_DYNAMIC_RESERVE in the first chunk and for
dynamic per_cpu_ptr's we can use some other offset such as
per_cpu_ptr_offset() or some such thing?

Then we can separate the static and dynamic chunks. And use large page
kernel-direct mappings for fast access for critical common things and
use small page accesses for dynamic and not so common accesses.

Just checking to see if we can reduce the complexity of setting up the
percpu areas (different versions for embed, non-embed etc) and handling
all these aliases with simple code, rather than making it complex.

thanks,
suresh