public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Ballasi <tballasi@linux.microsoft.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the mm-unstable tree
Date: Wed, 7 Jan 2026 11:16:57 +1100	[thread overview]
Message-ID: <20260107111657.1f30d1f6@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 7583 bytes --]

Hi all,

After merging the mm-unstable tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

In file included from include/trace/define_trace.h:132,
                 from include/trace/events/vmscan.h:569,
                 from mm/vmscan.c:73:
include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_shrink_slab_start':
include/trace/events/vmscan.h:248:68: error: invalid use of undefined type 'struct mem_cgroup'
  248 |                 __entry->memcg_id = sc->memcg ? cgroup_id(sc->memcg->css.cgroup) : 0;
      |                                                                    ^~
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:214:1: note: in expansion of macro 'TRACE_EVENT'
  214 | TRACE_EVENT(mm_shrink_slab_start,
      | ^~~~~~~~~~~
include/trace/events/vmscan.h:237:9: note: in expansion of macro 'TP_fast_assign'
  237 |         TP_fast_assign(
      |         ^~~~~~~~~~~~~~
include/trace/events/vmscan.h: In function 'do_trace_event_raw_event_mm_shrink_slab_end':
include/trace/events/vmscan.h:293:56: error: invalid use of undefined type 'struct mem_cgroup'
  293 |                 __entry->memcg_id = cgroup_id(sc->memcg->css.cgroup);
      |                                                        ^~
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:266:1: note: in expansion of macro 'TRACE_EVENT'
  266 | TRACE_EVENT(mm_shrink_slab_end,
      | ^~~~~~~~~~~
include/trace/events/vmscan.h:285:9: note: in expansion of macro 'TP_fast_assign'
  285 |         TP_fast_assign(
      |         ^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:133:
include/trace/events/vmscan.h: In function 'do_perf_trace_mm_shrink_slab_start':
include/trace/events/vmscan.h:248:68: error: invalid use of undefined type 'struct mem_cgroup'
  248 |                 __entry->memcg_id = sc->memcg ? cgroup_id(sc->memcg->css.cgroup) : 0;
      |                                                                    ^~
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:214:1: note: in expansion of macro 'TRACE_EVENT'
  214 | TRACE_EVENT(mm_shrink_slab_start,
      | ^~~~~~~~~~~
include/trace/events/vmscan.h:237:9: note: in expansion of macro 'TP_fast_assign'
  237 |         TP_fast_assign(
      |         ^~~~~~~~~~~~~~
include/trace/events/vmscan.h: In function 'do_perf_trace_mm_shrink_slab_end':
include/trace/events/vmscan.h:293:56: error: invalid use of undefined type 'struct mem_cgroup'
  293 |                 __entry->memcg_id = cgroup_id(sc->memcg->css.cgroup);
      |                                                        ^~
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:266:1: note: in expansion of macro 'TRACE_EVENT'
  266 | TRACE_EVENT(mm_shrink_slab_end,
      | ^~~~~~~~~~~
include/trace/events/vmscan.h:285:9: note: in expansion of macro 'TP_fast_assign'
  285 |         TP_fast_assign(
      |         ^~~~~~~~~~~~~~

Caused by commit

  6093cd0a2a93 ("mm: vmscan: add cgroup IDs to vmscan tracepoints")

$ grep MEMCG .config
# CONFIG_MEMCG is not set

I have applied the following hack for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 7 Jan 2026 10:38:50 +1100
Subject: [PATCH] fix up for "mm: vmscan: add cgroup IDs to vmscan tracepoints"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/trace/events/vmscan.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index d438abfa03eb..6a8ec045ae58 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -245,7 +245,11 @@ TRACE_EVENT(mm_shrink_slab_start,
 		__entry->priority = priority;
 		__entry->nid = sc->nid;
 		__entry->pid = current->pid;
+#ifdef CONFIG_MEMCG
 		__entry->memcg_id = sc->memcg ? cgroup_id(sc->memcg->css.cgroup) : 0;
+#else
+		__entry->memcg_id = 0;
+#endif
 	),
 
 	TP_printk("%pS %p: nid: %d pid: %d memcg_id: %u objects to shrink %ld gfp_flags %s cache items %ld delta %lld total_scan %ld priority %d %s",
@@ -290,7 +294,11 @@ TRACE_EVENT(mm_shrink_slab_end,
 		__entry->nid = sc->nid;
 		__entry->retval = shrinker_retval;
 		__entry->pid = current->pid;
+#ifdef CONFIG_MEMCG
 		__entry->memcg_id = cgroup_id(sc->memcg->css.cgroup);
+#else
+		__entry->memcg_id = 0;
+#endif
 	),
 
 	TP_printk("%pS %p: nid: %d pid: %d memcg_id: %u unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d %s",
-- 
2.52.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-01-07  0:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  0:16 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-18 13:51 linux-next: build failure after merge of the mm-unstable tree Mark Brown
2026-03-18 18:20 ` Andrew Morton
2026-03-18 19:08   ` Mark Brown
2025-09-11  6:05 Stephen Rothwell
2025-09-11  7:44 ` Kairui Song

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=20260107111657.1f30d1f6@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=tballasi@linux.microsoft.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox