From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932136AbcFUQbt (ORCPT ); Tue, 21 Jun 2016 12:31:49 -0400 Received: from mail-vk0-f47.google.com ([209.85.213.47]:35372 "EHLO mail-vk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbcFUQbr (ORCPT ); Tue, 21 Jun 2016 12:31:47 -0400 MIME-Version: 1.0 In-Reply-To: <20160621145539.byehondkdw6jhbha@treble> References: <1454292751-23472-1-git-send-email-riel@redhat.com> <20160201074156.GA27156@gmail.com> <20160203102247.GB5746@gmail.com> <20160620180004.tkid6nywbcq6frqt@treble> <20160621145539.byehondkdw6jhbha@treble> From: Andy Lutomirski Date: Tue, 21 Jun 2016 09:31:26 -0700 Message-ID: Subject: Re: [PATCH] perf: add 'perf bench syscall' To: Josh Poimboeuf Cc: Frederic Weisbecker , Thomas Gleixner , Arnaldo Carvalho de Melo , clark@redhat.com, Peter Zijlstra , Ingo Molnar , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Rik van Riel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jun 21, 2016 7:55 AM, "Josh Poimboeuf" wrote: > > On Mon, Jun 20, 2016 at 12:16:22PM -0700, Andy Lutomirski wrote: > > On Mon, Jun 20, 2016 at 11:00 AM, Josh Poimboeuf wrote: > > > > > > > > From: Josh Poimboeuf > > > 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. task_this_vnr -> pid_vnr -> pid_nr_ns There's probably something better than prctl, though. --Andy