public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] percpu: Optimize percpu accesses
@ 2008-07-01 12:16 Mike Travis
  2008-07-01 12:16 ` [RFC 1/5] x86_64: Fix early references to cpumask_of_cpu Mike Travis
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Mike Travis @ 2008-07-01 12:16 UTC (permalink / raw)
  To: Ingo Molnar, Jeremy Fitzhardinge, Eric W. Biederman
  Cc: Christoph Lameter, H. Peter Anvin, Andrew Morton, linux-kernel


This patchset provides the following:

  * Cleanup: Fix early references to cpumask_of_cpu(0)

    Provides an early cpumask_of_cpu(0) usable before the cpumask_of_cpu_map
    is allocated and initialized.

  * Generic: Percpu infrastructure to rebase the per cpu area to zero

    This provides for the capability of accessing the percpu variables
    using a local register instead of having to go through a table
    on node 0 to find the cpu-specific offsets.  It also would allow
    atomic operations on percpu variables to reduce required locking.
    Uses a new config var HAVE_ZERO_BASED_PER_CPU to indicate to the
    generic code that the arch has this new basing.

    (Note: split into two patches, one to rebase percpu variables at 0,
    and the second to actually use %gs as the base for percpu variables.)

  * x86_64: Fold pda into per cpu area

    Declare the pda as a per cpu variable. This will move the pda
    area to an address accessible by the x86_64 per cpu macros.
    Subtraction of __per_cpu_start will make the offset based from
    the beginning of the per cpu area.  Since %gs is pointing to the
    pda, it will then also point to the per cpu variables and can be
    accessed thusly:

	%gs:[&per_cpu_xxxx - __per_cpu_start]

  * x86_64: Rebase per cpu variables to zero

    Take advantage of the zero-based per cpu area provided above.
    Then we can directly use the x86_32 percpu operations. x86_32
    offsets %fs by __per_cpu_start. x86_64 has %gs pointing directly
    to the pda and the per cpu area thereby allowing access to the
    pda with the x86_64 pda operations and access to the per cpu
    variables using x86_32 percpu operations.


Based on linux-2.6.tip/master

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---

-- 

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

end of thread, other threads:[~2008-07-18  6:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 12:16 [RFC 0/5] percpu: Optimize percpu accesses Mike Travis
2008-07-01 12:16 ` [RFC 1/5] x86_64: Fix early references to cpumask_of_cpu Mike Travis
2008-07-01 12:16 ` [RFC 2/5] x86_64: Fold pda into per cpu area Mike Travis
2008-07-01 12:16 ` [RFC 3/5] x86_64: Reference zero-based percpu variables offset from gs Mike Travis
2008-07-01 12:16 ` [RFC 4/5] x86_64: Replace cpu_pda ops with percpu ops Mike Travis
2008-07-01 12:16 ` [RFC 5/5] x86_64: Replace xxx_pda() operations with x86_xxx_percpu() Mike Travis
2008-07-01 14:54 ` [RFC 0/5] percpu: Optimize percpu accesses Ingo Molnar
2008-07-01 15:03   ` Ingo Molnar
2008-07-01 15:07     ` Mike Travis
2008-07-02 14:04       ` Mike Travis
2008-07-18  6:52         ` Ingo Molnar
2008-07-01 18:47     ` Mike Travis

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