Messages in this thread | | | Date | Tue, 27 Jan 2009 15:08:57 -0500 (EST) | From | Christoph Lameter <> | Subject | Re: [PATCH] percpu: add optimized generic percpu accessors |
| |
On Tue, 27 Jan 2009, Tejun Heo wrote:
> > later). That's because they use TLB tricks for a static 64k per-cpu > > area, but this doesn't scale. That might not be vital: abandoning > > that trick will mean they can't optimise read_percpu/read_percpu_var > > etc as much.
Why wont it scale? this is a separate TLB entry for each processor.
> > Isn't something like the following possible? > > #define pcpu_read(ptr) \ > ({ \ > if (__builtin_constant_p(ptr) && \ > ptr >= PCPU_STATIC_START && ptr < PCPU_STATIC_END) \ > do 64k TLB trick for static pcpu; \ > else \ > do generic stuff; \ > })
The TLB trick is just to access the percpu data at a fixed base. I.e. value = SHIFT_PERCPU_PTR(percpu_var, FIXED_ADDRESS);
| |