public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: jeremy@goop.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/6] Per-processor private data areas for i386
Date: Wed, 27 Sep 2006 19:46:00 +0000	[thread overview]
Message-ID: <20060927194600.GA4538@ucw.cz> (raw)
In-Reply-To: <20060925184540.601971833@goop.org>

Hi!

> [ Changes since previous post:
>   - roll a new set of patches with all updates, based on 2.6.18-mm1 ]
> 
> Implement per-processor data areas for i386.
> 
> This patch implements per-processor data areas by using %gs as the
> base segment of the per-processor memory.  This has two principle
> advantages:
> 
> - It allows very simple direct access to per-processor data by
>   effectively using an effective address of the form %gs:offset, where
>   offset is the offset into struct i386_pda.  These sequences are faster
>   and smaller than the current mechanism using current_thread_info().
> 
> - It also allows per-CPU data to be allocated as each CPU is brought
>   up, rather than statically allocating it based on the maximum number
>   of CPUs which could be brought up.
> 
> Performance:
> 
> I've done some simple performance tests on an Intel Core Duo running
> at 1GHz (to emphisize any performance delta).  The results for the
> lmbench null syscall latency test, which should show the most negative
> effect from this change, show a ~9ns decline (.237uS -> .245uS).
> This corresponds to around 9 CPU cycles, and correlates well with
> the addition of the push/load/pop %gs into the hot path.

So we have 4% slowdown...

> I have not yet measured the effect on other typees of processor or
> more complex syscalls (though I would expect the push/pop overhead
> would be drowned by longer times spent in the kernel, and mitigated by
> actual use of the PDA).
> 
> The size improvements on the kernel text are nice as well: 
>     2889361 -> 2883936 = 5425 bytes saved

...and 0.2% smaller kernel. I guess you should demonstrate speedup at
complex syscalls before wedecide it is worth it...?

-- 
Thanks for all the (sleeping) penguins.

  parent reply	other threads:[~2006-09-27 19:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-25 18:45 [PATCH 0/6] Per-processor private data areas for i386 jeremy
2006-09-25 18:45 ` [PATCH 1/6] Initialize the per-CPU data area jeremy
2006-09-25 20:49   ` Andi Kleen
2006-09-25 20:59     ` Jeremy Fitzhardinge
2006-09-25 21:05       ` Andi Kleen
2006-09-25 21:33         ` Jeremy Fitzhardinge
2006-09-25 18:45 ` [PATCH 2/6] Use %gs as the PDA base-segment in the kernel jeremy
2006-09-25 18:45 ` [PATCH 3/6] Fix places where using %gs changes the usermode ABI jeremy
2006-09-25 18:45 ` [PATCH 4/6] Update sys_vm86 to cope with changed pt_regs and %gs usage jeremy
2006-09-25 18:45 ` [PATCH 5/6] Implement smp_processor_id() with the PDA jeremy
2006-09-25 18:45 ` [PATCH 6/6] Implement "current" " jeremy
2006-09-27 19:46 ` Pavel Machek [this message]
2006-09-27 20:28   ` [PATCH 0/6] Per-processor private data areas for i386 Jeremy Fitzhardinge
2006-09-27 20:28   ` Jeremy Fitzhardinge
2006-09-29  0:22     ` Rusty Russell

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=20060927194600.GA4538@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox