Received: by 10.192.165.156 with SMTP id m28csp754685imm; Fri, 13 Apr 2018 07:17:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+1KzD2k2Y8bYkkx/JPCg/LyWJguhs6iPmytadGLTfyFeBAH7nZUxhtOmhGru5PjwgR+2NM X-Received: by 10.99.0.200 with SMTP id 191mr4297118pga.33.1523629079576; Fri, 13 Apr 2018 07:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523629079; cv=none; d=google.com; s=arc-20160816; b=oUNwKc0sRhODI4aAjbgmKldzsrdNzqApTSIxYY/0iEzh2yjxowWXhqCABzUmqSSoWb CPLI/dSTLApsI9N2ZAlplBjbvri+NZdaADzqYGoFdonS3hYiFDxZuWue4fJcfuteBqiX ABiaMQBV7iwh9FvhPTADKg4WiVspBeVWPYBQm2iWJXT0w1/M2LLiTFFExI6mI/Xfsg2L ClCLpI4sGV7A8gbCDlg+4tWF4gkfjLDl9IBpMS/3lDLuSGcYnwsiccKYEEZUSD5Kdmrt cmC6V6IDCqBVX6WDgEiW9zG+9b7a3F3YQ3o3M0o3TOnUUFg/CAKEtb+RuYtApzkuPPc9 JCXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=iFEel/7qDC30MDOqByaiSxUwePdPmJFTw+ccU+zvVf0=; b=En5i29+ADecv4jWy6pRwa05jMn6+dwCNM71+zN3njO5t/J28hT1ac5Df5XgtW+9XP7 7ikZciYZBqCFh2/iBWjJqQsaoYPNUjHiCM7nllRpGfEOMH6aiYKRXmRIaj83PzryOiPl wJJohoqFuTsgR4qqmjB9nv6CctGA37SKOxiT5fGGIyhrilMEA7WyLhbuBAlZQ1GXAjJa UyOY+YVs8xYI4hAVhgCFjJQ+onxYrl3jwHgcp4rydeNbz2ZRHb7ATuUcDaI1KNRYx21+ HWrGHFIkEfyxJE30w0kNKIEp3J3nAuqlHPFVQU5FqXtjUDnc8GnAZUCligjiIAsj+0Z8 IJMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si4065932pgq.272.2018.04.13.07.17.45; Fri, 13 Apr 2018 07:17:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754467AbeDMOQQ (ORCPT + 99 others); Fri, 13 Apr 2018 10:16:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeDMOQO (ORCPT ); Fri, 13 Apr 2018 10:16:14 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4C472077B; Fri, 13 Apr 2018 14:16:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4C472077B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 13 Apr 2018 10:16:12 -0400 From: Steven Rostedt To: Steffen Maier Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Ingo Molnar , Jens Axboe , Li Zefan , Greg Kroah-Hartman Subject: Re: [PATCH 1/2] tracing/events: block: track and print if unplug was explicit or schedule Message-ID: <20180413101612.3999f742@gandalf.local.home> In-Reply-To: <20180413130719.22921-2-maier@linux.ibm.com> References: <20180413130719.22921-1-maier@linux.ibm.com> <20180413130719.22921-2-maier@linux.ibm.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Apr 2018 15:07:17 +0200 Steffen Maier wrote: > Just like blktrace distinguishes explicit and schedule by means of > BLK_TA_UNPLUG_IO and BLK_TA_UNPLUG_TIMER, actually make use of the > existing argument "explicit" to distinguish the two cases in the one > common tracepoint block_unplug. > > Complements v2.6.39 commit 49cac01e1fa7 ("block: make unplug timer trace > event correspond to the schedule() unplug") and commit d9c978331790 > ("block: remove block_unplug_timer() trace point"). > > Signed-off-by: Steffen Maier > --- > include/trace/events/block.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/include/trace/events/block.h b/include/trace/events/block.h > index 81b43f5bdf23..a13613d27cee 100644 > --- a/include/trace/events/block.h > +++ b/include/trace/events/block.h > @@ -470,6 +470,11 @@ TRACE_EVENT(block_plug, > TP_printk("[%s]", __entry->comm) > ); > > +#define show_block_unplug_explicit(val) \ > + __print_symbolic(val, \ > + {false, "schedule"}, \ > + {true, "explicit"}) That's new. I haven't seen "true"/"false" values used for print_symbolic before. But could you please use 1 and 0 instead, because perf and trace-cmd won't be able to parse that. I could update libtraceevent to handle it, but really, the first parameter is suppose to be numeric. -- Steve > + > DECLARE_EVENT_CLASS(block_unplug, > > TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), > @@ -478,15 +483,18 @@ DECLARE_EVENT_CLASS(block_unplug, > > TP_STRUCT__entry( > __field( int, nr_rq ) > + __field( bool, explicit ) > __array( char, comm, TASK_COMM_LEN ) > ), > > TP_fast_assign( > __entry->nr_rq = depth; > + __entry->explicit = explicit; > memcpy(__entry->comm, current->comm, TASK_COMM_LEN); > ), > > - TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) > + TP_printk("[%s] %d %s", __entry->comm, __entry->nr_rq, > + show_block_unplug_explicit(__entry->explicit)) > ); > > /**