From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751836AbbJJJF4 (ORCPT ); Sat, 10 Oct 2015 05:05:56 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35717 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbbJJJFu (ORCPT ); Sat, 10 Oct 2015 05:05:50 -0400 Date: Sat, 10 Oct 2015 11:05:46 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , Denys Vlasenko , Linus Torvalds , Borislav Petkov , Arnaldo Carvalho de Melo , Jiri Olsa Subject: Re: [PATCH v2 32/36] x86/entry: Micro-optimize compat fast syscall arg fetch Message-ID: <20151010090546.GA20819@gmail.com> References: <20151009073206.GB31859@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Fri, Oct 9, 2015 at 12:32 AM, Ingo Molnar wrote: > > > > * Andy Lutomirski wrote: > > > >> we're following a 32-bit pointer, and the uaccess code isn't smart > >> enough to figure out that the access_ok check isn't needed. > >> > >> This saves about three cycles on a cache-hot fast syscall. > > > > Another request: could you please stick the benchmarking code of the various x86 > > system call variants into 'perf bench' - under tools/perf/bench/, so that > > measurements can be done on more hardware and can be reproduced easily? > > > > I'd suggest we dedicate an entirely new benchmark family to it: 'perf bench x86' > > and then have: > > > > perf bench x86 syscall vdso > > perf bench x86 syscall int80 > > perf bench x86 syscall vdso-compat > > I'll play with this. I'm not too familiar with the perf bench stuff. So the perf bench stuff is meant to be a familiar home to kernel developers we'd like to slap a micro (or macro) benchmark into an easy to modify place. Over the years it has gathered a number of benchmarks - but more are always welcome. Just copy one of the existing benchmark modules (the tools/perf/bench/numa.c one is the most advanced one, tools/perf/bench/sched-pipe.c is the simplest one) and off you go. Here's a commit that adds a new benchmark suite: a043971141f1 ("perf bench: Add futex-hash microbenchmark") There are no big restrictions on the benchmarks: just put your existing code in that produces stdout output and it will be likely very close to upstream acceptable. Can help should you get stuck anywhere. Thanks, Ingo