[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrX=-Jb0BFJBU1ZwqzeVCdMRp+F5oeAbk12fNM0svXDaZg@mail.gmail.com>
Date: Mon, 1 Feb 2016 07:41:35 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Ingo Molnar <mingo@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Rik van Riel <riel@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, clark@...hat.com,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf tooling: Add 'perf bench syscall' benchmark
On Jan 31, 2016 11:42 PM, "Ingo Molnar" <mingo@...nel.org> wrote:
>
>
> * riel@...hat.com <riel@...hat.com> wrote:
>
> > (v3: address comments raised by Frederic)
> >
> > Running with nohz_full introduces a fair amount of overhead.
> > Specifically, various things that are usually done from the
> > timer interrupt are now done at syscall, irq, and guest
> > entry and exit times.
> >
> > However, some of the code that is called every single time
> > has only ever worked at jiffy resolution. The code in
> > __acct_update_integrals was also doing some unnecessary
> > calculations.
> >
> > Getting rid of the unnecessary calculations, without
> > changing any of the functionality in __acct_update_integrals
> > gets us about an 11% win.
> >
> > Not calling the time statistics updating code more than
> > once per jiffy, like is done on housekeeping CPUs and on
> > all the CPUs of a non-nohz_full system, shaves off a
> > further 30%.
> >
> > I tested this series with a microbenchmark calling
> > an invalid syscall number ten million times in a row,
> > on a nohz_full cpu.
> >
> > Run times for the microbenchmark:
> >
> > 4.4 3.8 seconds
> > 4.5-rc1 3.7 seconds
> > 4.5-rc1 + first patch 3.3 seconds
> > 4.5-rc1 + first 3 patches 3.1 seconds
> > 4.5-rc1 + all patches 2.3 seconds
>
> Another suggestion (beyond fixing the 32-bit build ;-), could you please stick
> your syscall microbenchmark into 'perf bench', so that we have a standardized way
> of checking such numbers?
>
> In fact I'd suggest we introduce an entirely new sub-tool for system call
> performance measurement - and this might be the first functionality of it.
>
> I've attached a quick patch that is basically a copy of 'perf bench numa' and
> which measures getppid() performance (simple syscall where the result is not
> cached by glibc).
>
> I kept the process, threading and memory allocation bits of numa.c, just in case
> we need them to measure more complex syscalls. Maybe we could keep the threading
> bits and remove the memory allocation parameters, to simplify the benchmark?
>
> Anyway, this could be a good base to start off on.
So much code...
I'll try to take a look this week. It shouldn't be so hard to port my
rdpmc-based widget over to this.
--Andy
Powered by blists - more mailing lists