public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [my_cpu_ptr 0/5] Introduce my_cpu_ptr/__my_cpu_ptr
@ 2009-05-27 17:46 cl
  2009-05-27 17:46 ` [my_cpu_ptr 1/5] Introduce my_cpu_ptr() cl
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: cl @ 2009-05-27 17:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tejun Heo, mingo, rusty, davem

The problem with per_cpu_ptr(x, smp_processor_id) is that it requires
an array lookup to find the offset for the cpu. Processors typically
have the offset for the current cpu area already in some kind of
(arch dependent) efficiently accessible register or memory location.

We can use the per cpu offset instead of doing the array lookup to speed up the
determination of the address of the percpu variable. This is particularly
significant because these lookups occur in performance critical paths
of the core kernel.

This optimization is a prerequiste to the introduction of per processor
atomic operations for the core code. Atomic per processor operations
implicitly do the offset calculation to the current per cpu area in a
single instruction. The locations touched by this patchset are potential
candidates for atomic per cpu operations.

The patchset does not cover arch code nor exotic cases where the current
cpu is determined before the call into a function.

-- 

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-06-03 14:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 17:46 [my_cpu_ptr 0/5] Introduce my_cpu_ptr/__my_cpu_ptr cl
2009-05-27 17:46 ` [my_cpu_ptr 1/5] Introduce my_cpu_ptr() cl
2009-05-28  3:46   ` Rusty Russell
2009-05-28 15:59     ` Christoph Lameter
2009-05-29  1:27       ` Rusty Russell
2009-05-29 15:37         ` Christoph Lameter
2009-05-31  3:19           ` Rusty Russell
2009-06-03 14:08             ` Christoph Lameter
2009-05-28 16:10     ` Christoph Hellwig
2009-05-28 16:37       ` Christoph Lameter
2009-05-29  9:46         ` Tejun Heo
2009-05-27 17:47 ` [my_cpu_ptr 2/5] Straight transformations cl
2009-05-27 17:47 ` [my_cpu_ptr 3/5] Elimninate get/put_cpu cl
2009-05-27 19:33   ` Christoph Lameter
2009-05-27 17:47 ` [my_cpu_ptr 4/5] sda_icsb_modify_counters() does not need a "cpu" variable cl
2009-05-28 13:45   ` Olaf Weber
2009-05-27 17:47 ` [my_cpu_ptr 5/5] Use my_cpu_ptr in crypto subsystem cl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox