]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
readahead-add-trace-points-v2
authorJan Kara <jack@suse.cz>
Tue, 9 Sep 2025 14:58:50 +0000 (16:58 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:59 +0000 (17:25 -0700)
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 <jack@suse.cz>
Cc: Pankaj Raghav <kernel@pankajraghav.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/trace/events/readahead.h
mm/readahead.c

index 992a6ce5c15437abb93e79d06c913c2e052f5fd2..0997ac5eceab1ac2de3b84b9d9d59cc338b9dd2b 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/fs.h>
 #include <linux/pagemap.h>
 
-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),
 
index 210395fe104474ceb5a8806ad742719eaaeb687b..3a4b5d58eeb6fe266fbfc4dd1c6033e016915ead 100644 (file)
@@ -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;