mm: vmscan: rework lru_shrink and write_folio tracepoints
Subsystems (4)
PATCH v2 1/1 mm: vmscan: rework lru_shrink and write_folio tracepoints
Currently, reclaim_flags always contains RECLAIM_WB_ASYNC in lru_shrink tracepoints since commit 41ac1999c3e35 ("mm: vmscan: do not stall on writeback during memory compaction"), which is useless for debugging memory pressure issues. Other RECLAIM_WB_* flags are not used anywhere else, so they can be directly removed.
This patch reworks the lru_shrink and write_folio tracepoints for better correlation and analysis:
- traces each folio lru type instead of reclaim_flags.
- traces each lru_shrink with reason.
- remove the printing of the unnecessary PFN for mm_vmscan_write_folio.
--- include/trace/events/vmscan.h | 71 +++++++++++++++-------------------- mm/vmscan.c | 9 +++-- 2 files changed, 35 insertions(+), 45 deletions(-)
include/trace/events/vmscan.h +30 -41
@@ -11,22 +11,6 @@#include <linux/memcontrol.h> #include <trace/events/mmflags.h> -#define RECLAIM_WB_ANON 0x0001u -#define RECLAIM_WB_FILE 0x0002u -#define RECLAIM_WB_MIXED 0x0010u -#define RECLAIM_WB_SYNC 0x0004u/* Unused, all reclaim async */ -#define RECLAIM_WB_ASYNC 0x0008u -#define RECLAIM_WB_LRU (RECLAIM_WB_ANON|RECLAIM_WB_FILE) - -#define show_reclaim_flags (flags) \ - (flags) ? __print_flags(flags, "|", \ - {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ - {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ - {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ - {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ - {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ - ) : "RECLAIM_WB_NONE" -#define _VMSCAN_THROTTLE_WRITEBACK (1 << VMSCAN_THROTTLE_WRITEBACK)#define _VMSCAN_THROTTLE_ISOLATED (1 << VMSCAN_THROTTLE_ISOLATED)#define _VMSCAN_THROTTLE_NOPROGRESS (1 << VMSCAN_THROTTLE_NOPROGRESS)
@@ -51,10 +35,11 @@ TRACE_DEFINE_ENUM(KSWAPD_CLEAR_HOPELESS_PCP); {KSWAPD_CLEAR_HOPELESS_PCP, "PCP"}, \ {KSWAPD_CLEAR_HOPELESS_OTHER, "OTHER"} -#define trace_reclaim_flags (file) ( \ - (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ - (RECLAIM_WB_ASYNC) \ - ) +#define trace_reclaim_reason_ops \ + {PGSTEAL_KSWAPD, "KSWAPD"}, \ + {PGSTEAL_DIRECT, "DIRECT"}, \ + {PGSTEAL_KHUGEPAGED, "KHUGEPAGED"}, \ + {PGSTEAL_PROACTIVE, "PROACTIVE"} TRACE_EVENT(mm_vmscan_kswapd_sleep,
@@ -361,20 +346,18 @@ TRACE_EVENT(mm_vmscan_write_folio,TP_ARGS (folio),TP_STRUCT__entry ( - __field(unsigned long, pfn) -__field (int ,reclaim_flags ) + __field(unsigned long, folio) +__field (int ,lru ) ),TP_fast_assign ( - __entry->pfn = folio_pfn(folio); - __entry->reclaim_flags =trace_reclaim_flags ( -folio_is_file_lru (folio)); + __entry->folio = folio; + __entry->lru =folio_lru_list (folio); ), -TP_printk ("page=%p pfn=0x%lx flags=%s" , -pfn_to_page (__entry->pfn), - __entry->pfn, -show_reclaim_flags (__entry->reclaim_flags)) +TP_printk ("folio=%p lru=%s" , + __entry->folio, +__print_symbolic (__entry->lru,LRU_NAMES )) ); TRACE_EVENT(mm_vmscan_reclaim_pages,
@@ -426,9 +409,9 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive, TP_PROTO(int nid, unsigned long nr_scanned, unsigned long nr_reclaimed, - struct reclaim_stat *stat, int priority, int file), + struct reclaim_stat *stat, int priority, int lru, int reason), -TP_ARGS (nid, nr_scanned, nr_reclaimed, stat, priority, file), +TP_ARGS (nid, nr_scanned, nr_reclaimed, stat, priority, lru, reason),TP_STRUCT__entry ( __field(int, nid)
@@ -443,7 +426,8 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive, __field(unsigned long, nr_ref_keep) __field(unsigned long, nr_unmap_fail) __field(int, priority) - __field(int, reclaim_flags) + __field(int, lru) + __field(int, reason) ), TP_fast_assign(
@@ -459,10 +443,11 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive, __entry->nr_ref_keep = stat->nr_ref_keep; __entry->nr_unmap_fail = stat->nr_unmap_fail; __entry->priority = priority; - __entry->reclaim_flags =trace_reclaim_flags (file); + __entry->lru = lru; + __entry->reason = reason; ), - TP_printk("nid=%d nr_scanned=%ld nr_reclaimed=%ld nr_dirty=%ld nr_writeback=%ld nr_congested=%ld nr_immediate=%ld nr_activate_anon=%d nr_activate_file=%d nr_ref_keep=%ld nr_unmap_fail=%ld priority=%d flags=%s", + TP_printk("nid=%d nr_scanned=%ld nr_reclaimed=%ld nr_dirty=%ld nr_writeback=%ld nr_congested=%ld nr_immediate=%ld nr_activate_anon=%d nr_activate_file=%d nr_ref_keep=%ld nr_unmap_fail=%ld priority=%d lru=%s reason=%s", __entry->nid, __entry->nr_scanned, __entry->nr_reclaimed, __entry->nr_dirty, __entry->nr_writeback,
@@ -470,16 +455,17 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive, __entry->nr_activate0, __entry->nr_activate1, __entry->nr_ref_keep, __entry->nr_unmap_fail, __entry->priority, - show_reclaim_flags(__entry->reclaim_flags)) +__print_symbolic (__entry->lru,LRU_NAMES ), + __print_symbolic(__entry->reason, trace_reclaim_reason_ops)) ); TRACE_EVENT(mm_vmscan_lru_shrink_active, TP_PROTO(int nid, unsigned long nr_taken, unsigned long nr_active, unsigned long nr_deactivated, - unsigned long nr_referenced, int priority, int file), + unsigned long nr_referenced, int priority, int lru, int reason), - TP_ARGS(nid, nr_taken, nr_active, nr_deactivated, nr_referenced, priority, file), + TP_ARGS(nid, nr_taken, nr_active, nr_deactivated, nr_referenced, priority, lru, reason), TP_STRUCT__entry( __field(int, nid)
@@ -488,7 +474,8 @@ TRACE_EVENT(mm_vmscan_lru_shrink_active, __field(unsigned long, nr_deactivated) __field(unsigned long, nr_referenced) __field(int, priority) - __field(int, reclaim_flags) + __field(int, lru) + __field(int, reason) ), TP_fast_assign(
@@ -498,15 +485,17 @@ TRACE_EVENT(mm_vmscan_lru_shrink_active, __entry->nr_deactivated = nr_deactivated; __entry->nr_referenced = nr_referenced; __entry->priority = priority; - __entry->reclaim_flags =trace_reclaim_flags (file); + __entry->lru = lru; + __entry->reason = reason; ), -TP_printk ("nid=%d nr_taken=%ld nr_active=%ld nr_deactivated=%ld nr_referenced=%ld priority=%d flags=%s" , +TP_printk ("nid=%d nr_taken=%ld nr_active=%ld nr_deactivated=%ld nr_referenced=%ld priority=%d lru=%s reason=%s" , __entry->nid, __entry->nr_taken, __entry->nr_active, __entry->nr_deactivated, __entry->nr_referenced, __entry->priority, -show_reclaim_flags (__entry->reclaim_flags)) +__print_symbolic (__entry->lru,LRU_NAMES ), +__print_symbolic (__entry->reason, trace_reclaim_reason_ops)) ); TRACE_EVENT(mm_vmscan_node_reclaim_begin,
mm/vmscan.c +5 -4
@@ -2044,7 +2044,7 @@ static unsigned long shrink_inactive_list(unsigned long nr_to_scan, sc->nr.file_taken += nr_taken;trace_mm_vmscan_lru_shrink_inactive (pgdat->node_id, - nr_scanned, nr_reclaimed, &stat, sc->priority, file); + nr_scanned, nr_reclaimed, &stat, sc->priority, lru, item);return nr_reclaimed; }
@@ -2151,7 +2151,8 @@ static void shrink_active_list(unsigned long nr_to_scan,lruvec_lock_irq (lruvec);lru_note_cost_unlock_irq (lruvec, file,0 , nr_rotated);trace_mm_vmscan_lru_shrink_active (pgdat->node_id, nr_taken, nr_activate, - nr_deactivate, nr_rotated, sc->priority, file); + nr_deactivate, nr_rotated, sc->priority, lru, +PGSTEAL_KSWAPD +reclaimer_offset (sc)); } static unsigned int reclaim_folio_list(struct list_head *folio_list,
@@ -4854,9 +4855,10 @@ static int evict_folios(unsigned long nr_to_scan, struct lruvec *lruvec, reclaimed =shrink_folio_list (&list, pgdat, sc, &stat, false, memcg); sc->nr.unqueued_dirty += stat.nr_unqueued_dirty; sc->nr_reclaimed += reclaimed; + item =PGSTEAL_KSWAPD +reclaimer_offset (sc);trace_mm_vmscan_lru_shrink_inactive (pgdat->node_id, scanned, reclaimed, &stat, sc->priority, - type ?LRU_INACTIVE_FILE :LRU_INACTIVE_ANON ); + type ?LRU_INACTIVE_FILE :LRU_INACTIVE_ANON , item);list_for_each_entry_safe_reverse (folio, next, &list, lru) {DEFINE_MIN_SEQ (lruvec);
@@ -4892,7 +4894,6 @@ static int evict_folios(unsigned long nr_to_scan, struct lruvec *lruvec,mod_lruvec_state (lruvec,PGDEMOTE_KSWAPD +reclaimer_offset (sc), stat.nr_demoted); - item =PGSTEAL_KSWAPD +reclaimer_offset (sc);mod_lruvec_state (lruvec, item, reclaimed);mod_lruvec_state (lruvec,PGSTEAL_ANON + type, reclaimed);
Signature · 1 line
2.25.1
Andrew Morton
maintainerQuoted 2 lines · On Wed, 6 May 2026 16:36:52 +0800 "qiwu.chen" <[email protected]> wrote:
From: "qiwu.chen" <[email protected]>
Signed-off-by qiwu.chen <[email protected]>
Which should we use? If it's the transsion.com address (which I assumed) then this can be communicated by placing an explicit From:
line at start-of-changelog.
Quoted 9 lines · Andrew Morton
Quoted 2 lines · On Wed, 6 May 2026 16:36:52 +0800 "qiwu.chen" <[email protected]> wrote:
From: "qiwu.chen" <[email protected]>
Signed-off-by qiwu.chen <[email protected]>Which should we use? If it's the transsion.com address (which I assumed) then this can be communicated by placing an explicit From:
line at start-of-changelog.
gmail address is used for communication, transsion.com is used for SOB which cannot communicated with msmtp normally.
Andrew Morton
maintainerQuoted 10 lines · On Wed, 6 May 2026 16:36:52 +0800 "qiwu.chen" <[email protected]> wrote:
Currently,
reclaim_flagsalways containsRECLAIM_WB_ASYNCinlru_shrinktracepoints since commit41ac1999c3e35("mm: vmscan: do not stall on writeback during memory compaction"), which is useless for debugging memory pressure issues. Other RECLAIM_WB_* flags are not used anywhere else, so they can be directly removed.
This patch reworks thelru_shrinkandwrite_foliotracepoints for better correlation and analysis:
- traces each folio lru type instead ofreclaim_flags.
- traces eachlru_shrinkwith reason.
- remove the printing of the unnecessary PFN formm_vmscan_write_folio.
Applying this to 7.1-rc1, my x86_64 allmodconfig blew up.
In file included from ./include/trace/define_trace.h:132,
from ./include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
./include/trace/events/vmscan.h: In function 'trace_raw_output_mm_vmscan_write_folio':
./include/trace/events/vmscan.h:358:19: error: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Werror=format=]
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~~~~~~~~~./include/trace/trace_events.h:219:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
219 | trace_event_printf(iter, print); \
| ^~~~~./include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
./include/trace/events/vmscan.h:358:9: note: in expansion of macro 'TP_printk'
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~
In file included from ./include/trace/trace_events.h:256:
./include/trace/events/vmscan.h:358:27: note: format string is defined here
358 | TP_printk("folio=%p lru=%s",
| ~^
| |
| void *
| %ld./include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_vmscan_write_folio':./include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^./include/trace/trace_events.h:427:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
427 | { assign; } \
| ^~~~~~
./include/trace/trace_events.h:435:23: note: in expansion of macro 'PARAMS'
435 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
./include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
./include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~In file included from ./include/trace/define_trace.h:133:./include/trace/events/vmscan.h: In function 'do_perf_trace_mm_vmscan_write_folio':./include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^./include/trace/perf.h:51:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
51 | { assign; } \
| ^~~~~~
./include/trace/perf.h:67:23: note: in expansion of macro 'PARAMS'
67 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
./include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
./include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:289: mm/vmscan.o] Error 1 make[2]: *** [scripts/Makefile.build:548: mm] Error 2 make[1]: *** [/usr/src/25/Makefile:2141: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Quoted 76 lines · Andrew Morton
Applying this to 7.1-rc1, my
x86_64allmodconfig blew up.In file included from
./include/trace/define_trace.h:132,from ./include/trace/events/vmscan.h:602, from mm/vmscan.c:72: ./include/trace/events/vmscan.h: In function 'trace_raw_output_mm_vmscan_write_folio': ./include/trace/events/vmscan.h:358:19: error: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Werror=format=] 358 | TP_printk("folio=%p lru=%s", | ^~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:219:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
219 |trace_event_printf(iter, print); \
| ^~~~~./include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'45 | PARAMS(print)); \ | ^~~~~~ ./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT' 342 | TRACE_EVENT(mm_vmscan_write_folio, | ^~~~~~~~~~~ ./include/trace/events/vmscan.h:358:9: note: in expansion of macro 'TP_printk' 358 | TP_printk("folio=%p lru=%s", | ^~~~~~~~~ In file included from ./include/trace/trace_events.h:256: ./include/trace/events/vmscan.h:358:27: note: format string is defined here 358 | TP_printk("folio=%p lru=%s", | ~^ | | | void * | %ld
./include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_vmscan_write_folio':./include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 |__entry->folio= folio;
| ^./include/trace/trace_events.h:427:11: note: in definition of macro '__DECLARE_EVENT_CLASS'427 | { assign; } \ | ^~~~~~ ./include/trace/trace_events.h:435:23: note: in expansion of macro 'PARAMS' 435 | PARAMS(assign), PARAMS(print)) \ | ^~~~~~ ./include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' 40 | DECLARE_EVENT_CLASS(name, \ | ^~~~~~~~~~~~~~~~~~~ ./include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS' 44 | PARAMS(assign), \ | ^~~~~~ ./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT' 342 | TRACE_EVENT(mm_vmscan_write_folio, | ^~~~~~~~~~~ ./include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign' 353 | TP_fast_assign( | ^~~~~~~~~~~~~~In file included from
./include/trace/define_trace.h:133:./include/trace/events/vmscan.h: In function 'do_perf_trace_mm_vmscan_write_folio':./include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 |__entry->folio= folio;
| ^./include/trace/perf.h:51:11: note: in definition of macro '__DECLARE_EVENT_CLASS'51 | { assign; } \ | ^~~~~~ ./include/trace/perf.h:67:23: note: in expansion of macro 'PARAMS' 67 | PARAMS(assign), PARAMS(print)) \ | ^~~~~~ ./include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' 40 | DECLARE_EVENT_CLASS(name, \ | ^~~~~~~~~~~~~~~~~~~ ./include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS' 44 | PARAMS(assign), \ | ^~~~~~ ./include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT' 342 | TRACE_EVENT(mm_vmscan_write_folio, | ^~~~~~~~~~~ ./include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign' 353 | TP_fast_assign( | ^~~~~~~~~~~~~~
Quoted 6 lines
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:289:mm/vmscan.o] Error 1 make[2]: *** [scripts/Makefile.build:548: mm] Error 2 make[1]: *** [/usr/src/25/Makefile:2141: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Sorry, I ignored the rookie mistake which I built pass with the aarch64-linux-gnu toolchain. Could you please apply the following minor fix change based on this patch?
include/trace/events/vmscan.h +1 -1
@@ -346,7 +346,7 @@ TRACE_EVENT(mm_vmscan_write_folio,TP_ARGS (folio),TP_STRUCT__entry ( - __field(unsigned long, folio) + __field(struct folio *, folio)__field (int ,lru ) ),
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi qiwu.chen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.1-rc3]
[cannot apply to akpm-mm/mm-everything trace/for-next next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/qiwu-chen/mm-vmscan-rework-lru_shrink-and-write_folio-tracepoints/20260513-040720 base: linus/master patch link: https://lore.kernel.org/r/20260506083652.100160-1-qiwu.chen%40transsion.com patch subject: [PATCH v2] mm: vmscan: rework lru_shrink and write_folio tracepoints config: sh-defconfig (https://download.01.org/0day-ci/archive/20260513/[email protected]/config) compiler: sh4-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:132,
from include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
include/trace/events/vmscan.h: In function 'trace_raw_output_mm_vmscan_write_folio':
>> include/trace/events/vmscan.h:358:19: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Wformat=]
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~~~~~~~~~
include/trace/trace_events.h:219:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
219 | trace_event_printf(iter, print); \
| ^~~~~
include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:358:9: note: in expansion of macro 'TP_printk'
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~
In file included from include/trace/trace_events.h:256:
include/trace/events/vmscan.h:358:27: note: format string is defined here
358 | TP_printk("folio=%p lru=%s",
| ~^
| |
| void *
| %ld
include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_vmscan_write_folio':
include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^
include/trace/trace_events.h:427:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
427 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:435:23: note: in expansion of macro 'PARAMS'
435 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:133:
include/trace/events/vmscan.h: In function 'do_perf_trace_mm_vmscan_write_folio':
include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^
include/trace/perf.h:51:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
51 | { assign; } \
| ^~~~~~
include/trace/perf.h:67:23: note: in expansion of macro 'PARAMS'
67 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~vim +358 include/trace/events/vmscan.h
343
344 TP_PROTO(struct folio *folio),
345
346 TP_ARGS(folio),
347
348 TP_STRUCT__entry(
349 __field(unsigned long, folio)
350 __field(int, lru)
351 ),
352
353 TP_fast_assign(
354 __entry->folio = folio;
355 __entry->lru = folio_lru_list(folio);
356 ),
357
> 358 TP_printk("folio=%p lru=%s", 359 __entry->folio,
360 __print_symbolic(__entry->lru, LRU_NAMES))
361 );
362
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi qiwu.chen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.1-rc3]
[cannot apply to akpm-mm/mm-everything trace/for-next next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/qiwu-chen/mm-vmscan-rework-lru_shrink-and-write_folio-tracepoints/20260513-040720 base: linus/master patch link: https://lore.kernel.org/r/20260506083652.100160-1-qiwu.chen%40transsion.com patch subject: [PATCH v2] mm: vmscan: rework lru_shrink and write_folio tracepoints config: xtensa-randconfig-001-20260513 (https://download.01.org/0day-ci/archive/20260513/[email protected]/config) compiler: xtensa-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:132,
from include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
include/trace/events/vmscan.h: In function 'trace_raw_output_mm_vmscan_write_folio':
include/trace/events/vmscan.h:358:12: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Wformat=]
TP_printk("folio=%p lru=%s",
^~~~~~~~~~~~~~~~~
include/trace/trace_events.h:219:27: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_event_printf(iter, print); \
^~~~~
include/trace/trace_events.h:45:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_vmscan_write_folio,
^~~~~~~~~~~
include/trace/events/vmscan.h:358:2: note: in expansion of macro 'TP_printk'
TP_printk("folio=%p lru=%s",
^~~~~~~~~
In file included from include/trace/trace_events.h:256,
from include/trace/define_trace.h:132,
from include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
include/trace/events/vmscan.h:358:20: note: format string is defined here
TP_printk("folio=%p lru=%s",
~^
%ld
In file included from include/trace/define_trace.h:132,
from include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_vmscan_write_folio':
>> include/trace/events/vmscan.h:354:18: warning: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
__entry->folio = folio;
^
include/trace/trace_events.h:427:4: note: in definition of macro '__DECLARE_EVENT_CLASS'
{ assign; } \
^~~~~~
include/trace/trace_events.h:435:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), PARAMS(print)) \
^~~~~~
include/trace/trace_events.h:40:2: note: in expansion of macro 'DECLARE_EVENT_CLASS'
DECLARE_EVENT_CLASS(name, \
^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:44:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), \
^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_vmscan_write_folio,
^~~~~~~~~~~
include/trace/events/vmscan.h:353:2: note: in expansion of macro 'TP_fast_assign'
TP_fast_assign(
^~~~~~~~~~~~~~vim +354 include/trace/events/vmscan.h
343
344 TP_PROTO(struct folio *folio),
345
346 TP_ARGS(folio),
347
348 TP_STRUCT__entry(
349 __field(unsigned long, folio)
350 __field(int, lru)
351 ),
352
353 TP_fast_assign(
> 354 __entry->folio = folio;
355 __entry->lru = folio_lru_list(folio);
356 ),
357
358 TP_printk("folio=%p lru=%s",
359 __entry->folio,
360 __print_symbolic(__entry->lru, LRU_NAMES))
361 );
362
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi qiwu.chen,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.1-rc3]
[cannot apply to akpm-mm/mm-everything trace/for-next next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/qiwu-chen/mm-vmscan-rework-lru_shrink-and-write_folio-tracepoints/20260513-040720 base: linus/master patch link: https://lore.kernel.org/r/20260506083652.100160-1-qiwu.chen%40transsion.com patch subject: [PATCH v2] mm: vmscan: rework lru_shrink and write_folio tracepoints config: sh-defconfig (https://download.01.org/0day-ci/archive/20260513/[email protected]/config) compiler: sh4-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from include/trace/define_trace.h:132,
from include/trace/events/vmscan.h:602,
from mm/vmscan.c:72:
include/trace/events/vmscan.h: In function 'trace_raw_output_mm_vmscan_write_folio':
include/trace/events/vmscan.h:358:19: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Wformat=]
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~~~~~~~~~
include/trace/trace_events.h:219:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
219 | trace_event_printf(iter, print); \
| ^~~~~
include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:358:9: note: in expansion of macro 'TP_printk'
358 | TP_printk("folio=%p lru=%s",
| ^~~~~~~~~
In file included from include/trace/trace_events.h:256:
include/trace/events/vmscan.h:358:27: note: format string is defined here
358 | TP_printk("folio=%p lru=%s",
| ~^
| |
| void *
| %ld
include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_vmscan_write_folio':
>> include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^
include/trace/trace_events.h:427:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
427 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:435:23: note: in expansion of macro 'PARAMS'
435 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:133:
include/trace/events/vmscan.h: In function 'do_perf_trace_mm_vmscan_write_folio':
>> include/trace/events/vmscan.h:354:32: error: assignment to 'long unsigned int' from 'struct folio *' makes integer from pointer without a cast [-Wint-conversion]
354 | __entry->folio = folio;
| ^
include/trace/perf.h:51:11: note: in definition of macro '__DECLARE_EVENT_CLASS'
51 | { assign; } \
| ^~~~~~
include/trace/perf.h:67:23: note: in expansion of macro 'PARAMS'
67 | PARAMS(assign), PARAMS(print)) \
| ^~~~~~
include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
40 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
include/trace/events/vmscan.h:342:1: note: in expansion of macro 'TRACE_EVENT'
342 | TRACE_EVENT(mm_vmscan_write_folio,
| ^~~~~~~~~~~
include/trace/events/vmscan.h:353:9: note: in expansion of macro 'TP_fast_assign'
353 | TP_fast_assign(
| ^~~~~~~~~~~~~~vim +354 include/trace/events/vmscan.h
343
344 TP_PROTO(struct folio *folio),
345
346 TP_ARGS(folio),
347
348 TP_STRUCT__entry(
349 __field(unsigned long, folio)
350 __field(int, lru)
351 ),
352
353 TP_fast_assign(
> 354 __entry->folio = folio;
355 __entry->lru = folio_lru_list(folio);
356 ),
357
358 TP_printk("folio=%p lru=%s",
359 __entry->folio,
360 __print_symbolic(__entry->lru, LRU_NAMES))
361 );
362
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki