Thread (21 messages) 21 messages, 10 authors, 2009-01-31

Re: [PATCH] percpu: add optimized generic percpu accessors

From: Christoph Lameter <hidden>
Date: 2009-01-27 21:06:05
Also in: lkml

Possibly related (same subject, not in this thread)

On Tue, 27 Jan 2009, Tejun Heo wrote:
quoted
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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help