Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2742328pxt; Mon, 9 Aug 2021 07:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrPIInxtx1bD5SUfX6UkJ622392YIM5sVRVYhr4EC8Qt/XM34EpWgy+JM1yGBd+gUHzw+t X-Received: by 2002:a05:6638:40ab:: with SMTP id m43mr10934967jam.52.1628520920245; Mon, 09 Aug 2021 07:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628520920; cv=none; d=google.com; s=arc-20160816; b=Mdx5Tv6qBMpIGz68YGiiyLIcz1iCNIYNLE0rl++yOdaOR+FVA3sESidiM3t2kGtYxP qBuNuh+U3Fu1U0nTFmH4pqqUaFCfO2eCe/cSh7TqJ+6QioxLClVSBfS94Nhn2F4V8k7C /m6UR4njIL3I684NJB5B6CwgWJxue0g3X5vRBuBIz6Kat4wYuBt7f94nYiedr9bPTywc 0QQc2XgaanaXoHFu73UpT0ik2f3D6qkW5mxe/9iveQfP8VOQGw5GkunyI++OuDFcGz4Q jSRWSav7mYp7stacfh2M5n9tttj505/qrmy+QSK4buEfxorSLc59ZWyRMVSUP9hCoApp uGKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Kn3ik3CEjqIFyLbwCufF9+mmGGvknxZAPETfL7zEqHk=; b=n5vq9evepmlm0qM20bRxUp71q5QGPv2EPfWN1FfnlfRoE8h2qg5+6pDW97sErkMQEx lZXdiN0s97rDetA/ZufEIheWi6FFxpjOjW0CuBaoZ862wFluOPyKdsfcg7jG95xajj7o 2D1wvojiMxExXiUUdnPW1KFQq7zg7f5+8Zx6SNd0y0FLHMcFEQV3g1cozwWYa+ELMQ1J 9tFn8b7SCo4IlVTaokgUqXO+8fw9vBvGDBfJNEitYE+ixYSX+afFGAXD1Z6ZZA5U7e1r i72cnQ35ganbtqj3HdiX4WIaFa1POLGUcRsHtz0hVOp4Xol9TAaZ4LDMjieSNaAWaFTZ iAxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="fUr/klYI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t20si18736790jam.49.2021.08.09.07.55.08; Mon, 09 Aug 2021 07:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="fUr/klYI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234054AbhHIOyb (ORCPT + 99 others); Mon, 9 Aug 2021 10:54:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:42328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhHIOya (ORCPT ); Mon, 9 Aug 2021 10:54:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34A1560C41; Mon, 9 Aug 2021 14:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628520850; bh=83f7z34kd8o684E4Kj/wmBh4rlOyA2DHLiEBx97X158=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fUr/klYIPb1ZxcX3jinvYOy2b8MjWGO8+yaNWW2gar+4NLhMo3wajUvqFSNzXUQ9x b00BroZDDo+qIJqtZWwhdutBAnoblHirWHXAIkpTMaXzFW566kgwkpQXJ2DX7lZZno 8c5Q+IvC5tal2Gxv2FOiphBCtTCsCIv70bDYOK65WIrOVFue+LuP0udJznyNb19hxS cMQupg68tfc19herrrrqN/RS2kJTcfN+BxHVGbc+vdX3HjnBGRx11AmWjmmftUf0t9 /JFsnVpPs/CQumKeKK/NiIFmYtcxt21aOg8O2k+E70CYlJUrtsxOEOWMRsxebCxA/Q wIvvcZ5ROVIrA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 65DBC403F2; Mon, 9 Aug 2021 11:54:07 -0300 (-03) Date: Mon, 9 Aug 2021 11:54:07 -0300 From: Arnaldo Carvalho de Melo To: Davidlohr Bueso Cc: mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 3/7] perf/bench-futex: Factor out futex_flag Message-ID: References: <20210809043301.66002-1-dave@stgolabs.net> <20210809043301.66002-4-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210809043301.66002-4-dave@stgolabs.net> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sun, Aug 08, 2021 at 09:32:57PM -0700, Davidlohr Bueso escreveu: > This is common across all tests, move it into futex.h. Wouldn't be better to have it defined in one place and then in futex.h just have a 'extern int futex_flag;' declaration? I applied the first two patches already. - Arnaldo > Signed-off-by: Davidlohr Bueso > --- > tools/perf/bench/futex-hash.c | 1 - > tools/perf/bench/futex-lock-pi.c | 1 - > tools/perf/bench/futex-requeue.c | 1 - > tools/perf/bench/futex-wake-parallel.c | 1 - > tools/perf/bench/futex-wake.c | 1 - > tools/perf/bench/futex.h | 3 +++ > 6 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c > index ddca7558e559..b71a34204b79 100644 > --- a/tools/perf/bench/futex-hash.c > +++ b/tools/perf/bench/futex-hash.c > @@ -30,7 +30,6 @@ > #include > > static bool done = false; > -static int futex_flag = 0; > > struct timeval bench__start, bench__end, bench__runtime; > static pthread_mutex_t thread_lock; > diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c > index ce980df23bb0..bc208edf3de3 100644 > --- a/tools/perf/bench/futex-lock-pi.c > +++ b/tools/perf/bench/futex-lock-pi.c > @@ -32,7 +32,6 @@ struct worker { > static u_int32_t global_futex = 0; > static struct worker *worker; > static bool done = false; > -static int futex_flag = 0; > static pthread_mutex_t thread_lock; > static unsigned int threads_starting; > static struct stats throughput_stats; > diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c > index 66747bfe22cf..4001312122be 100644 > --- a/tools/perf/bench/futex-requeue.c > +++ b/tools/perf/bench/futex-requeue.c > @@ -36,7 +36,6 @@ static pthread_mutex_t thread_lock; > static pthread_cond_t thread_parent, thread_worker; > static struct stats requeuetime_stats, requeued_stats; > static unsigned int threads_starting; > -static int futex_flag = 0; > > static struct bench_futex_parameters params = { > /* > diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c > index 958372ad159c..ea4fdea6e2f3 100644 > --- a/tools/perf/bench/futex-wake-parallel.c > +++ b/tools/perf/bench/futex-wake-parallel.c > @@ -53,7 +53,6 @@ static pthread_cond_t thread_parent, thread_worker; > static pthread_barrier_t barrier; > static struct stats waketime_stats, wakeup_stats; > static unsigned int threads_starting; > -static int futex_flag = 0; > > static struct bench_futex_parameters params; > > diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c > index 9ed4d65416f3..1cf651c8ee5c 100644 > --- a/tools/perf/bench/futex-wake.c > +++ b/tools/perf/bench/futex-wake.c > @@ -37,7 +37,6 @@ static pthread_mutex_t thread_lock; > static pthread_cond_t thread_parent, thread_worker; > static struct stats waketime_stats, wakeup_stats; > static unsigned int threads_starting; > -static int futex_flag = 0; > > static struct bench_futex_parameters params = { > /* > diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h > index 6f8b85b67348..f7cd22bbd677 100644 > --- a/tools/perf/bench/futex.h > +++ b/tools/perf/bench/futex.h > @@ -13,6 +13,9 @@ > #include > #include > > +/* FUTEX_PRIVATE_FLAG or zero */ > +static int futex_flag = 0; > + > struct bench_futex_parameters { > bool silent; > bool fshared; > -- > 2.26.2 > -- - Arnaldo