All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Brian Gerst <brgerst@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Borislav Petkov <bp@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH v3 0/7] x86: Rewrite switch_to()
Date: Mon, 15 Aug 2016 07:10:02 +0200	[thread overview]
Message-ID: <20160815051002.GB16267@gmail.com> (raw)
In-Reply-To: <CAMzpN2hSoebz26z+ithTCc-PRGpDEcLX2Q=63rgW3h9d9y+3vw@mail.gmail.com>


* Brian Gerst <brgerst@gmail.com> wrote:

> > Something like this:
> >
> >   taskset 1 perf stat -a -e '{instructions,cycles}' --repeat 10 perf bench sched pipe
> >
> > ... will give a very good idea about the general impact of these changes on
> > context switch overhead.
> 
> Before:
>  Performance counter stats for 'system wide' (10 runs):
> 
>     12,010,932,128      instructions              #    1.03  insn per
> cycle                                              ( +-  0.31% )
>     11,691,797,513      cycles
>                ( +-  0.76% )
> 
>        3.487329979 seconds time elapsed
>           ( +-  0.78% )
> 
> After:
>  Performance counter stats for 'system wide' (10 runs):
> 
>     12,097,706,506      instructions              #    1.04  insn per
> cycle                                              ( +-  0.14% )
>     11,612,167,742      cycles
>                ( +-  0.81% )
> 
>        3.451278789 seconds time elapsed
>           ( +-  0.82% )
> 
> The numbers with or without this patch series are roughly the same.
> There is noticeable variation in the numbers each time I run it, so
> I'm not sure how good of a benchmark this is.

Weird, I get an order of magnitude lower noise:

 triton:~/tip> taskset 1 perf stat -a -e '{instructions,cycles}' --repeat 10 perf bench sched pipe >/dev/null

 Performance counter stats for 'system wide' (10 runs):

    11,503,026,062      instructions              #    1.23  insn per cycle                                              ( +-  2.64% )
     9,377,410,613      cycles                                                        ( +-  2.05% )

       1.669425407 seconds time elapsed                                          ( +-  0.12% )

But note that I also had '--sync' for perf stat and did a >/dev/null at the end to 
make sure no terminal output and subsequent Xorg activities interfere. Also, full 
screen terminal.

Maybe try 'taskset 4' as well to put the workload on another CPU, if the first CPU 
is busier than the others?

(Any Hyperthreading on your test system?)

Thanks,

	Ingo

  reply	other threads:[~2016-08-15  5:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13 16:38 [PATCH v3 0/7] x86: Rewrite switch_to() Brian Gerst
2016-08-13 16:38 ` [PATCH v3 1/7] x86-32, kgdb: Don't use thread.ip in sleeping_thread_to_gdb_regs() Brian Gerst
2016-08-24 13:07   ` [tip:x86/asm] sched/x86/32, " tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 2/7] x86-64, kgdb: clear GDB_PS on 64-bit Brian Gerst
2016-08-24 13:07   ` [tip:x86/asm] sched/x86/64, kgdb: Clear " tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 3/7] x86: Add struct inactive_task_frame Brian Gerst
2016-08-24 13:08   ` [tip:x86/asm] sched/x86: Add 'struct inactive_task_frame' to better document the sleeping task stack frame tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 4/7] x86: Rewrite switch_to() code Brian Gerst
2016-08-24 13:08   ` [tip:x86/asm] sched/x86: Rewrite the " tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 5/7] x86: Pass kernel thread parameters in fork_frame Brian Gerst
2016-08-24 13:09   ` [tip:x86/asm] sched/x86: Pass kernel thread parameters in 'struct fork_frame' tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 6/7] x86: Fix thread_saved_pc() Brian Gerst
2016-08-24 13:09   ` [tip:x86/asm] sched/x86: " tip-bot for Brian Gerst
2016-08-13 16:38 ` [PATCH v3 7/7] Revert "sched: Mark __schedule() stack frame as non-standard" Brian Gerst
2016-08-24 13:09   ` [tip:x86/asm] sched: Remove __schedule() non-standard frame annotation tip-bot for Brian Gerst
2016-08-13 17:16 ` [PATCH v3 0/7] x86: Rewrite switch_to() Linus Torvalds
2016-08-13 18:15   ` Brian Gerst
2016-08-13 18:45     ` Ingo Molnar
2016-08-13 19:33       ` Andy Lutomirski
2016-08-17  5:16         ` Herbert Xu
2016-08-14 14:18       ` Brian Gerst
2016-08-15  5:10         ` Ingo Molnar [this message]
2016-08-15 11:43           ` Brian Gerst
2016-08-17 21:23           ` Andy Lutomirski
2016-08-17 21:20 ` Josh Poimboeuf

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=20160815051002.GB16267@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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 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.