public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Nick Piggin <npiggin@suse.de>, Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: lmbench ctxsw regression with CFS
Date: Mon, 13 Aug 2007 20:00:38 -0700	[thread overview]
Message-ID: <20070813200038.7fc8a9e6.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070813123031.GS23758@kernel.dk>

On Mon, 13 Aug 2007 14:30:31 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:

> On Mon, Aug 06 2007, Nick Piggin wrote:
> > > > What CPU did you get these numbers on? Do the indirect calls hurt much 
> > > > on those without an indirect predictor? (I'll try running some tests).
> > > 
> > > it was on an older Athlon64 X2. I never saw indirect calls really 
> > > hurting on modern x86 CPUs - dont both CPU makers optimize them pretty 
> > > efficiently? (as long as the target function is always the same - which 
> > > it is here.)
> > 
> > I think a lot of CPUs do. I think ia64 does not. It predicts
> > based on the contents of a branch target register which has to
> > be loaded I presume before instructoin fetch reaches the branch.
> > I don't know if this would hurt or not.
> 
> Testing on ia64 showed that the indirect calls in the io scheduler hurt
> quite a bit, so I'd be surprised if the impact here wasn't an issue
> there.

With what workload?  lmbench ctxsw?  Who cares?

Look, if you're doing 100,000 context switches per second per then *that*
is your problem.  You suck, and making context switches a bit faster
doesn't stop you from sucking.  And ten microseconds is a very long time
indeed.

Put it this way: if a 50% slowdown in context switch times yields a 5%
improvement in, say, balancing decisions then it's probably a net win.

Guys, repeat after me: "context switch is not a fast path".  Take that
benchmark and set fire to it.


  reply	other threads:[~2007-08-14  3:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02  2:15 lmbench ctxsw regression with CFS Nick Piggin
2007-08-02  2:31 ` Linus Torvalds
2007-08-02  2:41   ` Nick Piggin
2007-08-02  7:19     ` Ingo Molnar
2007-08-02  7:31       ` Nick Piggin
2007-08-02 15:44         ` Ingo Molnar
2007-08-03  0:14           ` Nick Piggin
2007-08-04  6:50             ` Ingo Molnar
2007-08-06  3:29               ` Nick Piggin
2007-08-13 12:30                 ` Jens Axboe
2007-08-14  3:00                   ` Andrew Morton [this message]
2007-08-14  3:23                     ` Nick Piggin
2007-08-16 21:28                       ` Siddha, Suresh B
2007-08-14  3:25                     ` David Miller

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=20070813200038.7fc8a9e6.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=torvalds@linux-foundation.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