From: Jan Kara Date: Tue, 9 Sep 2025 14:58:50 +0000 (+0200) Subject: readahead-add-trace-points-v2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=49bba8e23bb2dfc5778ef6424110e5bb5b9971f0;p=users%2Fjedix%2Flinux-maple.git readahead-add-trace-points-v2 Move tracepoint from do_page_cache_ra() to page_cache_ra_unbounded() as that is a more standard function. Link: https://lkml.kernel.org/r/20250909145849.5090-2-jack@suse.cz Signed-off-by: Jan Kara Cc: Pankaj Raghav Signed-off-by: Andrew Morton --- diff --git a/include/trace/events/readahead.h b/include/trace/events/readahead.h index 992a6ce5c154..0997ac5eceab 100644 --- a/include/trace/events/readahead.h +++ b/include/trace/events/readahead.h @@ -11,7 +11,7 @@ #include #include -TRACE_EVENT(do_page_cache_ra, +TRACE_EVENT(page_cache_ra_unbounded, TP_PROTO(struct inode *inode, pgoff_t index, unsigned long nr_to_read, unsigned long lookahead_size), diff --git a/mm/readahead.c b/mm/readahead.c index 210395fe1044..3a4b5d58eeb6 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -228,6 +228,8 @@ void page_cache_ra_unbounded(struct readahead_control *ractl, */ unsigned int nofs = memalloc_nofs_save(); + trace_page_cache_ra_unbounded(mapping->host, index, nr_to_read, + lookahead_size); filemap_invalidate_lock_shared(mapping); index = mapping_align_index(mapping, index); @@ -317,7 +319,6 @@ static void do_page_cache_ra(struct readahead_control *ractl, loff_t isize = i_size_read(inode); pgoff_t end_index; /* The last page we want to read */ - trace_do_page_cache_ra(inode, index, nr_to_read, lookahead_size); if (isize == 0) return;