linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Yongpeng Yang <yangyongpeng1@oppo.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-trace-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] blktrace: Add 'P' identifier to mark I/O with REQ_POLLED flag
Date: Tue, 27 Aug 2024 10:15:28 +0800	[thread overview]
Message-ID: <2bb2e9bb-08b4-47ed-8102-24b60071d7e4@kernel.org> (raw)
In-Reply-To: <20240823072529.438548-1-yangyongpeng1@oppo.com>

On 2024/8/23 15:25, Yongpeng Yang wrote:
> blk_fill_rwbs function currently does not recognize REQ_POLLED I/O,
> it's not convenient to trace the I/O handling process on the
> HCTX_TYPE_POLL type hardware queue. Add a 'P' identifier to 'rwbs'
> to mark such I/O for tracing.
> 
> Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com>
> ---
>   kernel/trace/blktrace.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index 8fd292d34d89..69b7857d0189 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -1908,6 +1908,8 @@ void blk_fill_rwbs(char *rwbs, blk_opf_t opf)
>   		rwbs[i++] = 'S';
>   	if (opf & REQ_META)
>   		rwbs[i++] = 'M';
> +	if (opf & REQ_POLLED)
> +		rwbs[i++] = 'P';

DECLARE_EVENT_CLASS(bio,
	TP_PROTO(struct bio *bio),
	TP_ARGS(bio),

	TP_STRUCT__entry(
		__field(dev_t,		dev			)
		__field(sector_t,	sector			)
		__field(unsigned int,	nr_sector		)
		__array(char,		rwbs,	6		)
	),

Not sure, maybe we need to expand one more byte for rwbs array, if
REQ_POLLED flag can be Ored w/ other flags.

Thanks,

>   
>   	rwbs[i] = '\0';
>   }


      reply	other threads:[~2024-08-27  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  7:25 [PATCH] blktrace: Add 'P' identifier to mark I/O with REQ_POLLED flag Yongpeng Yang
2024-08-27  2:15 ` Chao Yu [this message]

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=2bb2e9bb-08b4-47ed-8102-24b60071d7e4@kernel.org \
    --to=chao@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=yangyongpeng1@oppo.com \
    /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;
as well as URLs for NNTP newsgroup(s).