Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdILOQX (ORCPT ); Tue, 12 Sep 2017 10:16:23 -0400 Received: from mga11.intel.com ([192.55.52.93]:19132 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751337AbdILOQU (ORCPT ); Tue, 12 Sep 2017 10:16:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,383,1500966000"; d="scan'208";a="1217777583" Message-ID: <1505225771.1331.3.camel@tzanussi-mobl.amr.corp.intel.com> Subject: Re: [PATCH v2 36/40] tracing: Remove lookups from tracing_map hitcount From: Tom Zanussi To: Masami Hiramatsu Cc: rostedt@goodmis.org, tglx@linutronix.de, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel.opensrc@gmail.com, joelaf@google.com, mathieu.desnoyers@efficios.com, baohong.liu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Date: Tue, 12 Sep 2017 09:16:11 -0500 In-Reply-To: <20170912111611.a629bdf12ccaa001c3c518ff@kernel.org> References: <4c3ada8f9d958a5a926bbfa812c816bf8e73764b.1504642143.git.tom.zanussi@linux.intel.com> <20170912111611.a629bdf12ccaa001c3c518ff@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1266 Lines: 40 Hi Masami, On Tue, 2017-09-12 at 11:16 +0900, Masami Hiramatsu wrote: > Hi Tom, > > On Tue, 5 Sep 2017 16:57:48 -0500 > Tom Zanussi wrote: > > > Lookups inflate the hitcount, making it essentially useless. Only > > inserts and updates should really affect the hitcount anyway, so > > explicitly filter lookups out. > > > > Signed-off-by: Tom Zanussi > > --- > > kernel/trace/tracing_map.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c > > index a4e5a56..f8e2338 100644 > > --- a/kernel/trace/tracing_map.c > > +++ b/kernel/trace/tracing_map.c > > @@ -538,7 +538,8 @@ static inline bool keys_match(void *key, void *test_key, unsigned key_size) > > if (test_key && test_key == key_hash) { > > if (entry->val && > > keys_match(key, entry->val->key, map->key_size)) { > > - atomic64_inc(&map->hits); > > + if (!lookup_only) > > + atomic64_inc(&map->hits); > > Is this a kind of bugfix for current code? > If so, such patch can be posted in separate series. > Yeah, that sounds like a good idea - will separate this out along with another one or two in the same boat.. Thanks, Tom