From: Eric Dumazet <dada1@cosmosbay.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: akpm@osdl.org, Arjan van de Ven <arjan@infradead.org>,
ak@suse.de, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i386-pda UP optimization
Date: Wed, 29 Nov 2006 10:30:56 +0100 [thread overview]
Message-ID: <200611291030.56670.dada1@cosmosbay.com> (raw)
In-Reply-To: <456CC25C.6070005@goop.org>
On Wednesday 29 November 2006 00:12, Jeremy Fitzhardinge wrote:
> Hi Eric,
>
> Could you try this patch out and see if it makes much performance
> difference for you. You should apply this on top of the %fs patch I
> posted earlier (and use the %fs patch as the baseline for your
> comparisons).
Hi Jeremy
I will try this as soon as possible, thank you.
However I have some remarks browsing your patch.
> +#ifdef CONFIG_SMP
> +#define LOAD_PDA_SEG(reg) \
> + movl $(__KERNEL_PDA), reg; \
> + movl reg, %fs
> +#define CUR_CPU(reg) movl %fs:PDA_cpu, reg
> +#else
> +#define LOAD_PDA_SEG(reg)
> +#define CUR_CPU(reg) movl boot_pda+PDA_cpu, reg
if !CONFIG_SMP, why even dereferencing boot_pda+PDA_cpu to get 0 ?
and as PER_CPU(cpu_gdt_descr, %ebx) in !CONFIG_SMP doesnt need the a value in
ebx, you can just do :
#define CUR_CPU(reg) /* nothing */
> --- a/include/asm-i386/pda.h Tue Nov 21 18:54:56 2006 -0800
> +++ b/include/asm-i386/pda.h Wed Nov 22 02:35:24 2006 -0800
> @@ -22,6 +22,16 @@ extern struct i386_pda *_cpu_pda[];
>
My patch was better IMHO : we dont need to force asm () instructions to
perform regular C variable reading/writing in !CONFIG_SMP case.
Using plain C allows compiler to generate a better code.
Eric
next prev parent reply other threads:[~2006-11-29 9:30 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 7:35 i386 PDA patches use of %gs Arjan van de Ven
2006-09-12 7:48 ` Jeremy Fitzhardinge
2006-09-12 7:56 ` Arjan van de Ven
2006-09-12 8:31 ` Jeremy Fitzhardinge
2006-11-15 11:27 ` [PATCH] i386-pda UP optimization Eric Dumazet
2006-11-15 11:32 ` Andi Kleen
2006-11-15 17:20 ` Ingo Molnar
2006-11-15 17:24 ` Andi Kleen
2006-11-15 17:46 ` Eric Dumazet
2006-11-15 17:49 ` Ingo Molnar
2006-11-15 17:58 ` Eric Dumazet
2006-11-15 18:01 ` Ingo Molnar
2006-11-21 11:38 ` Eric Dumazet
2006-11-21 21:42 ` Jeremy Fitzhardinge
2006-11-21 21:52 ` Andi Kleen
2006-11-21 22:10 ` Jeremy Fitzhardinge
2006-11-21 21:58 ` Eric Dumazet
2006-11-21 23:12 ` Jeremy Fitzhardinge
2006-11-15 17:28 ` Jeremy Fitzhardinge
2006-11-15 17:32 ` Ingo Molnar
2006-11-15 17:59 ` Jeremy Fitzhardinge
2006-11-15 18:05 ` Eric Dumazet
2006-11-15 18:28 ` Jeremy Fitzhardinge
2006-11-15 18:31 ` Ingo Molnar
2006-11-15 18:01 ` Arjan van de Ven
2006-11-15 18:24 ` Jeremy Fitzhardinge
2006-11-15 19:06 ` Ingo Molnar
2006-11-17 0:24 ` Jeremy Fitzhardinge
2006-11-15 17:52 ` Jeremy Fitzhardinge
2006-11-28 23:12 ` Jeremy Fitzhardinge
2006-11-29 9:30 ` Eric Dumazet [this message]
2006-11-29 9:56 ` Jeremy Fitzhardinge
2006-09-13 1:00 ` i386 PDA patches use of %gs Jeremy Fitzhardinge
2006-09-13 9:59 ` Ingo Molnar
2006-09-13 16:17 ` Jeremy Fitzhardinge
2006-11-15 18:26 ` Ingo Molnar
2006-11-15 18:29 ` Ingo Molnar
2006-11-15 18:43 ` Jeremy Fitzhardinge
2006-11-15 18:44 ` Ingo Molnar
2006-11-15 18:39 ` Jeremy Fitzhardinge
2006-11-15 18:43 ` Ingo Molnar
2006-11-15 18:49 ` Jeremy Fitzhardinge
2006-11-15 18:49 ` Ingo Molnar
2006-11-15 19:00 ` Jeremy Fitzhardinge
2006-11-15 19:03 ` Ingo Molnar
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=200611291030.56670.dada1@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®