mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: axboe@kernel.dk, tj@kernel.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] blk-iocost: Add iocg idle state tracepoint
Date: Thu, 17 Dec 2020 15:57:24 +0800	[thread overview]
Message-ID: <3aa9c1a1-5640-b60c-4fab-22ee7de40539@linux.alibaba.com> (raw)
In-Reply-To: <1ba7a38d5a6186b1e71432ef424c23ba1904a365.1607591591.git.baolin.wang@linux.alibaba.com>

Hi Jens,

> It will be helpful to trace the iocg's whole state, including active and
> idle state. And we can easily expand the original iocost_iocg_activate
> trace event to support a state trace class, including active and idle
> state tracing.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Could you pick up patch 1 which was already acked by Tejun. Thanks.

> ---
>   block/blk-iocost.c            |  3 +++
>   include/trace/events/iocost.h | 16 +++++++++++++++-
>   2 files changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/block/blk-iocost.c b/block/blk-iocost.c
> index ffa418c..ac6078a 100644
> --- a/block/blk-iocost.c
> +++ b/block/blk-iocost.c
> @@ -2185,6 +2185,9 @@ static int ioc_check_iocgs(struct ioc *ioc, struct ioc_now *now)
>   							    WEIGHT_ONE);
>   			}
>   
> +			TRACE_IOCG_PATH(iocg_idle, iocg, now,
> +					atomic64_read(&iocg->active_period),
> +					atomic64_read(&ioc->cur_period), vtime);
>   			__propagate_weights(iocg, 0, 0, false, now);
>   			list_del_init(&iocg->active_list);
>   		}
> diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
> index 0b68699..e282ce0 100644
> --- a/include/trace/events/iocost.h
> +++ b/include/trace/events/iocost.h
> @@ -11,7 +11,7 @@
>   
>   #include <linux/tracepoint.h>
>   
> -TRACE_EVENT(iocost_iocg_activate,
> +DECLARE_EVENT_CLASS(iocost_iocg_state,
>   
>   	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
>   		u64 last_period, u64 cur_period, u64 vtime),
> @@ -59,6 +59,20 @@
>   	)
>   );
>   
> +DEFINE_EVENT(iocost_iocg_state, iocost_iocg_activate,
> +	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> +		 u64 last_period, u64 cur_period, u64 vtime),
> +
> +	TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
> +);
> +
> +DEFINE_EVENT(iocost_iocg_state, iocost_iocg_idle,
> +	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> +		 u64 last_period, u64 cur_period, u64 vtime),
> +
> +	TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
> +);
> +
>   DECLARE_EVENT_CLASS(iocg_inuse_update,
>   
>   	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> 

  parent reply	other threads:[~2020-12-17  7:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 10:56 Baolin Wang
2020-12-10 10:56 ` [PATCH 2/2] blk-iocost: Use alloc_percpu_gfp() to simplify the code Baolin Wang
2020-12-10 14:26   ` Tejun Heo
2020-12-11  7:13     ` Baolin Wang
2020-12-16 15:21       ` Tejun Heo
2020-12-17  7:53         ` Baolin Wang
2020-12-10 14:27 ` [PATCH 1/2] blk-iocost: Add iocg idle state tracepoint Tejun Heo
2020-12-17  7:57 ` Baolin Wang [this message]
2020-12-17 14:56   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3aa9c1a1-5640-b60c-4fab-22ee7de40539@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®