All of lore.kernel.org
 help / color / mirror / Atom feed
From: chenqiwu <qiwuchen55@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rostedt@goodmis.org, mhiramat@kernel.org, hannes@cmpxchg.org,
	david@kernel.org, mhocko@kernel.org, willy@infradead.org,
	linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org,
	"qiwu.chen" <qiwu.chen@transsion.com>
Subject: Re: [PATCH v2] mm: vmscan: rework lru_shrink and write_folio tracepoints
Date: Sun, 10 May 2026 08:36:34 +0800	[thread overview]
Message-ID: <20260510003634.GB5833@rlk> (raw)
In-Reply-To: <20260508182932.ee1931dec680db80a8a8e660@linux-foundation.org>

On Fri, May 08, 2026 at 06:29:32PM -0700, Andrew Morton wrote:
> 
> 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
>
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?
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -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)
        ),



  reply	other threads:[~2026-05-10  0:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06  8:36 [PATCH v2] mm: vmscan: rework lru_shrink and write_folio tracepoints qiwu.chen
2026-05-08 23:47 ` Andrew Morton
2026-05-10  0:27   ` chenqiwu
2026-05-09  1:29 ` Andrew Morton
2026-05-10  0:36   ` chenqiwu [this message]
2026-05-13  0:45 ` kernel test robot
2026-05-13  1:19 ` kernel test robot
2026-05-13  3:04 ` kernel test robot

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=20260510003634.GB5833@rlk \
    --to=qiwuchen55@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=qiwu.chen@transsion.com \
    --cc=rostedt@goodmis.org \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.