Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754290AbcC1Fxf (ORCPT ); Mon, 28 Mar 2016 01:53:35 -0400 Received: from mail-qk0-f170.google.com ([209.85.220.170]:32862 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124AbcC1Fx0 (ORCPT ); Mon, 28 Mar 2016 01:53:26 -0400 MIME-Version: 1.0 In-Reply-To: <56F546D5.5090107@fb.com> References: <7dff940d08f26e9994557d94652f581ad84899e0.1458893798.git.baolin.wang@linaro.org> <56F546D5.5090107@fb.com> Date: Mon, 28 Mar 2016 13:53:24 +0800 Message-ID: Subject: Re: [PATCH v2] mmc: Provide tracepoints for request processing From: Baolin Wang To: Jens Axboe Cc: Ulf Hansson , Steven Rostedt , mingo@redhat.com, adrian.hunter@intel.com, yangbo.lu@freescale.com, akpm@linux-foundation.org, JBottomley@odin.com, lporzio@micron.com, jonathanh@nvidia.com, Grant Grundler , fabf@skynet.be, yunpeng.gao@intel.com, dan.j.williams@intel.com, rabin.vincent@axis.com, chuanxiao.dong@intel.com, shawn.lin@rock-chips.com, =?UTF-8?Q?Heiko_St=C3=BCbner?= , Douglas Anderson , david@protonic.nl, Mark Brown , Linus Walleij , Takahiro Akashi , LKML , linux-mmc@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2701 Lines: 100 On 25 March 2016 at 22:10, Jens Axboe wrote: > On 03/25/2016 02:19 AM, Baolin Wang wrote: >> >> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c >> index fe207e5..d372a2d 100644 >> --- a/drivers/mmc/card/block.c >> +++ b/drivers/mmc/card/block.c >> @@ -46,6 +46,9 @@ >> >> #include "queue.h" >> >> +#define CREATE_TRACE_POINTS >> +#include >> + >> MODULE_ALIAS("mmc:block"); >> #ifdef MODULE_PARAM_PREFIX >> #undef MODULE_PARAM_PREFIX >> @@ -1709,6 +1712,7 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue >> *mq, struct request *req) >> if (phys_segments > max_phys_segs) >> break; >> >> + trace_mmc_block_packed_req(next); >> list_add_tail(&next->queuelist, &mqrq->packed->list); >> cur = next; >> reqs++; > > > This looks like the only valid trace point in the block part. OK. > >> @@ -1870,6 +1874,7 @@ static int mmc_blk_end_packed_req(struct >> mmc_queue_req *mq_rq) >> } >> list_del_init(&prq->queuelist); >> blk_end_request(prq, 0, blk_rq_bytes(prq)); >> + trace_mmc_block_req_done(prq); > > > We just logged a complete event through blk_end_request() here. I'll remove this repeated tracepoint. >> >> @@ -1985,6 +1990,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, >> struct request *rqc) >> } else { >> ret = blk_end_request(req, 0, >> brq->data.bytes_xfered); >> + trace_mmc_block_req_done(req); >> } > > > Ditto Will remove it too. > >> diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c >> index 6f4323c..d0388cf 100644 >> --- a/drivers/mmc/card/queue.c >> +++ b/drivers/mmc/card/queue.c >> @@ -16,6 +16,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> #include >> @@ -64,6 +65,9 @@ static int mmc_queue_thread(void *d) >> mq->mqrq_cur->req = req; >> spin_unlock_irq(q->queue_lock); >> >> + if (req) >> + trace_mmc_queue_fetch(req); > > > Issue event was just logged here, if req != NULL. So also redundant. Make sense. > > Basically only your core mmc events would potentially have merit, the rest > are all dupes. So nak. I'll remove the redundant tracepoints. Thanks for your comments. > > -- > Jens Axboe > -- Baolin.wang Best Regards