Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: Chao Yu <chao@kernel.org>,
	linux-kernel@vger.kernel.org,
	Zhan Xusheng <zhanxusheng@xiaomi.com>,
	linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
Subject: Re: [PATCH v2] erofs: add folio order to trace_erofs_read_folio
Date: Thu, 18 Jun 2026 16:12:03 +0800	[thread overview]
Message-ID: <6d3abdf7-8395-40fe-8b68-95a3bcbb63d4@linux.alibaba.com> (raw)
In-Reply-To: <20260617074334.2761632-1-zhanxusheng@xiaomi.com>



On 2026/6/17 15:43, Zhan Xusheng wrote:
> erofs supports large folios for reads, but the actual folio order
> instantiated in the page cache may be lower due to allocation
> constraints such as memory fragmentation.
> 
> trace_erofs_read_folio already receives the folio being read but
> currently records only its index. Add folio_order() to the tracepoint
> so that users can observe the realized folio order and verify the
> effectiveness of large folio reads.
> 
> Also drop the uptodate field: read_folio() is only called for a
> non-uptodate folio, so it is always 0.
> 
> Suggested-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

But pls also Cc erofs mailing list <linux-erofs@lists.ozlabs.org>
next time

Thanks,
Gao Xiang

> ---
>   include/trace/events/erofs.h | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h
> index cd0e3fd8c23f..0a178cb10fb1 100644
> --- a/include/trace/events/erofs.h
> +++ b/include/trace/events/erofs.h
> @@ -90,7 +90,7 @@ TRACE_EVENT(erofs_read_folio,
>   		__field(erofs_nid_t,    nid     )
>   		__field(int,		dir	)
>   		__field(pgoff_t,	index	)
> -		__field(int,		uptodate)
> +		__field(unsigned int,	order	)
>   		__field(bool,		raw	)
>   	),
>   
> @@ -99,16 +99,15 @@ TRACE_EVENT(erofs_read_folio,
>   		__entry->nid	= EROFS_I(inode)->nid;
>   		__entry->dir	= S_ISDIR(inode->i_mode);
>   		__entry->index	= folio->index;
> -		__entry->uptodate = folio_test_uptodate(folio);
> +		__entry->order	= folio_order(folio);
>   		__entry->raw = raw;
>   	),
>   
> -	TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, uptodate = %d "
> -		"raw = %d",
> +	TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, order = %u, raw = %d",
>   		show_dev_nid(__entry),
>   		show_file_type(__entry->dir),
>   		(unsigned long)__entry->index,
> -		__entry->uptodate,
> +		__entry->order,
>   		__entry->raw)
>   );
>   



           reply	other threads:[~2026-06-18  8:12 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20260617074334.2761632-1-zhanxusheng@xiaomi.com>]

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=6d3abdf7-8395-40fe-8b68-95a3bcbb63d4@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.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