All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
	virtualization <virtualization@lists.osdl.org>,
	Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@muc.de>
Subject: Re: Per-cpu patches on top of PDA stuff...
Date: Tue, 19 Sep 2006 13:39:21 -0700	[thread overview]
Message-ID: <45105579.1070901@goop.org> (raw)
In-Reply-To: <1158653031.23629.1.camel@localhost.localdomain>

Rusty Russell wrote:
> This patch uses the "gs" segment register which Jeremy Fitzhardinge
> freed up for kernel use, for the per-cpu section.  This means that
> instead of having a special per-cpu struct which we can access in a
> single instruction, any per-cpu variable can be accessed in a single
> instruction.  In addition, it avoids introducing the concept of a
> "pda" into the kernel, in favour of the well-known "percpu" concept.
>   

The PDA is well established in the x86-64 tree; one of the reasons for 
having an x86-32 PDA was to make the trees a bit more similar.

> More cleanups/optimizations are possible:
> 1) Don't save/restore %gs on UP.  The cost is measurable, and we don't use it.
>   

You need to make sure the userspace %gs gets saved/restored for context 
switch.  If you don't do it in entry.S, you need to have two versions of 
the %gs-handling code in a number of places around the kernel 
(__switch_to, vm86, ptrace).

> 2) Remove early_smp_processor_id(), by setting up the per-cpu
>    processor_id field correctly before starting a CPU.
> 3) Similarly, get rid of early_current().
>   

I've already submitted a patch to do this.  In fact, it would help if 
you could rebase against my most recent patches (which I think Andrew 
has queued for the next -mm, and are in the paravirt patch queue).

Also, does this patch address the problem of percpu module variables?  
That was the only real sticking point with my previous percpu-in-pda patch.

I can't say this patch fills me with joy.

    J

  parent reply	other threads:[~2006-09-19 20:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-19  3:13 Per-cpu patches on top of PDA stuff Rusty Russell
2006-09-19  8:03 ` Rusty Russell
2006-09-19  8:26   ` Andi Kleen
2006-09-19 20:39   ` Jeremy Fitzhardinge [this message]
2006-09-19  8:14 ` Jeremy Fitzhardinge
2006-09-19 21:03   ` Chris Wright
2006-09-19 22:36     ` Jeremy Fitzhardinge
2006-09-20  0:07   ` Rusty Russell
2006-09-20  7:00     ` Andi Kleen
2006-09-20 12:54       ` James Bottomley
2006-09-20 16:09         ` Andi Kleen
2006-09-20 16:15           ` James Bottomley
2006-09-20 16:22             ` Andi Kleen
2006-09-20 16:42               ` James Bottomley
2006-09-20 17:49                 ` Andi Kleen
2006-09-20 18:10                   ` James Bottomley
2006-09-20 18:42                     ` Andi Kleen
2006-09-21  8:54                     ` Rusty Russell
2006-09-19 20:37 ` Chris Wright
2006-09-19 20:40   ` Jeremy Fitzhardinge
2006-09-19 21:08     ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45105579.1070901@goop.org \
    --to=jeremy@goop.org \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.