From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933807AbdABSRw convert rfc822-to-8bit (ORCPT ); Mon, 2 Jan 2017 13:17:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933285AbdABSRV (ORCPT ); Mon, 2 Jan 2017 13:17:21 -0500 Subject: Re: [PATCH v4 13/20] perf bench: New microbenchmark for userspace mutex performance To: Arnaldo Carvalho de Melo References: <1483028026-10305-1-git-send-email-longman@redhat.com> <1483028026-10305-14-git-send-email-longman@redhat.com> <20170102171640.GA21566@kernel.org> Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Davidlohr Bueso , Mike Galbraith , Scott J Norton From: Waiman Long Organization: Red Hat Message-ID: <6b35902c-c9b2-82d0-2d93-daee97c3865e@redhat.com> Date: Mon, 2 Jan 2017 13:17:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170102171640.GA21566@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8BIT X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 02 Jan 2017 18:17:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/02/2017 12:16 PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 29, 2016 at 11:13:39AM -0500, Waiman Long escreveu: >> This microbenchmark simulates how the use of different futex types >> can affect the actual performanace of userspace mutex locks. The >> usage is: >> >> perf bench futex mutex > Showing the tool output is preferred, trim it if needed or state why > that is not possible. I will do so when I update the patchset. > >> Three sets of simple mutex lock and unlock functions are implemented >> using the wait-wake, PI and TP futexes respectively. This >> microbenchmark then runs the locking rate measurement tests using >> either one of those mutexes or all of them consecutively. >> >> Signed-off-by: Waiman Long >> --- >> tools/perf/bench/Build | 1 + >> tools/perf/bench/bench.h | 1 + >> tools/perf/bench/futex-locks.c | 844 +++++++++++++++++++++++++++++++++++++++++ >> tools/perf/bench/futex.h | 23 ++ >> tools/perf/builtin-bench.c | 10 + >> tools/perf/check-headers.sh | 4 + > You forgot to document it in tools/perf/Documentation/perf-bench.txt Yes, I forgot about that. I will update the document in the next v5 patchset. > Also I would suggest you submit this first without supportint TP > futexes, i.e. supporting just what is in the kernel already, this way I > could cherry-pick this, which would be useful already for benchmarking > the existing types of futexes. > > Then, after the new futex type is accepted into the kernel, in a > separate patch you would add support for it in 'perf bench futex mutex'. I can separate out the TP portion of the changes and put them later in the patchset. Thanks for the comments. Cheers, Longman