All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-kernel@vger.kernel.org
Subject: Re: scheduler / perf stat question about CPU-migrations
Date: Thu, 16 Jun 2011 17:18:39 +0200	[thread overview]
Message-ID: <20110616151836.GC23624@somewhere.redhat.com> (raw)
In-Reply-To: <4DFA1D07.1050705@draigBrady.com>

On Thu, Jun 16, 2011 at 04:11:03PM +0100, Pádraig Brady wrote:
> On 16/06/11 16:03, Frederic Weisbecker wrote:
> > On Thu, Jun 16, 2011 at 10:46:26AM -0400, Theodore Ts'o wrote:
> >> Can someone tell me how I'm being confused?
> >>
> >> I ran the following command as root:
> >>
> >> 	perf stat schedtool -a 1 -e e2fsck -ft /dev/funarg/kbuild
> > 
> > A theory is that schedtool does:
> > 
> > if (!fork()) {
> > 	set affinity there
> > 	launch e2fsck
> > }
> 
> Well `taskset` and `chrt` from util-linux don't fork at least,
> so you could try those instead.

Even if they don't fork and change their own affinity, you'll get
migrations that happened since taskset/chrt were launched.

The only solution is too set perf affinity itself:

	schedtool -a 1 -e perf stat -- e2fsck -ft /dev/funarg/kbuild

Taskset would work too.

> 
> I also suggest protecting the command with --
> in case perf is not stopping at the first unrecognized option.
> 
> cheers,
> Pádraig.

  reply	other threads:[~2011-06-16 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 14:46 scheduler / perf stat question about CPU-migrations Theodore Ts'o
2011-06-16 15:03 ` Frederic Weisbecker
2011-06-16 15:11   ` Pádraig Brady
2011-06-16 15:18     ` Frederic Weisbecker [this message]
2011-06-17  2:44       ` Ted Ts'o
2011-06-17  5:58         ` David Ahern

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=20110616151836.GC23624@somewhere.redhat.com \
    --to=fweisbec@gmail.com \
    --cc=P@draigBrady.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.