mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] erofs: add folio order to trace_erofs_read_folio
@ 2026-06-17  7:16 Zhan Xusheng
  2026-06-17  7:25 ` Gao Xiang
  0 siblings, 1 reply; 4+ messages in thread
From: Zhan Xusheng @ 2026-06-17  7:16 UTC (permalink / raw)
  To: Gao Xiang; +Cc: Chao Yu, linux-kernel, Zhan Xusheng

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.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 include/trace/events/erofs.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h
index cd0e3fd8c23f..73d3bfd8b673 100644
--- a/include/trace/events/erofs.h
+++ b/include/trace/events/erofs.h
@@ -90,6 +90,7 @@ TRACE_EVENT(erofs_read_folio,
 		__field(erofs_nid_t,    nid     )
 		__field(int,		dir	)
 		__field(pgoff_t,	index	)
+		__field(unsigned int,	order	)
 		__field(int,		uptodate)
 		__field(bool,		raw	)
 	),
@@ -99,15 +100,17 @@ TRACE_EVENT(erofs_read_folio,
 		__entry->nid	= EROFS_I(inode)->nid;
 		__entry->dir	= S_ISDIR(inode->i_mode);
 		__entry->index	= folio->index;
+		__entry->order	= folio_order(folio);
 		__entry->uptodate = folio_test_uptodate(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, "
+		"uptodate = %d raw = %d",
 		show_dev_nid(__entry),
 		show_file_type(__entry->dir),
 		(unsigned long)__entry->index,
+		__entry->order,
 		__entry->uptodate,
 		__entry->raw)
 );
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-18  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17  7:16 [PATCH] erofs: add folio order to trace_erofs_read_folio Zhan Xusheng
2026-06-17  7:25 ` Gao Xiang
2026-06-17  7:43   ` [PATCH v2] " Zhan Xusheng
2026-06-18  8:12     ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome