Re: [PATCH] perf: add 'perf bench syscall'
From: Josh Poimboeuf
Date: Tue Jun 21 2016 - 11:02:46 EST
On Mon, Jun 20, 2016 at 12:16:22PM -0700, Andy Lutomirski wrote:
> On Mon, Jun 20, 2016 at 11:00 AM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> >
> > From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> > Subject: [PATCH] perf: add 'perf bench syscall'
> >
> > Add a basic 'perf bench syscall' benchmark which does a getppid() system
> > call in a tight loop.
> >
>
> My one suggestion would be to use a different syscall than getppid(),
> as getppid() can have unusual performance characteristics on kernels
> with pid namespaces enabled. I'm a fan of prctl(-1, 0, 0, 0, 0).
Hm, can you elaborate on the unusual performance characteristics of
getppid()? The code seems pretty minimal.
prctl() actually seems much worse to me, because of all the security
module cruft.
--
Josh