* [PATCH] mm/vmstat: add per-order allocation slow path statistics
@ 2026-08-20 13:36 Daniil Tatianin
2026-08-20 22:49 ` Andrew Morton
2026-08-21 7:42 ` kernel test robot
0 siblings, 2 replies; 5+ messages in thread
From: Daniil Tatianin @ 2026-08-20 13:36 UTC (permalink / raw)
To: Andrew Morton, linux-mm
Cc: Daniil Tatianin, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, Brendan Jackman, Johannes Weiner, Zi Yan,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Mike Rapoport, linux-kernel
Production incidents caused by bursts of high-order allocations all
entering direct compaction are currently hard to attribute from
/proc/vmstat: pgalloc_* has no order breakdown, and compact_stall does
not say which order stalled. Tracepoints can recover this on a single
machine, but they are impractical as an always-on fleet-wide monitoring
source, which is what is needed to correlate latency regressions with
allocation behavior after the fact.
Add per-order event counters to /proc/vmstat, covering only the
allocation slow path, so the page allocator fast path is not touched
at all:
- pgalloc_slowpath_orderN: entries into __alloc_pages_slowpath(),
counted once per allocation, before the restart loop
- pgalloc_fail_orderN: allocations that returned NULL to the caller
(including a successful allocation freed by memcg charge failure)
- compact_stall_orderN / compact_success_orderN: per-order split of
the existing direct compaction counters, order 0 is omitted since
direct compaction is never entered for it
All new counters are purely additive: the existing keys are untouched
and compact_stall == sum of compact_stall_orderN.
alloc_pages_nolock() is deliberately not counted: it is opportunistic,
never enters the slow path, and its NULL returns are expected rather
than failures.
Counter names are generated for any MAX_PAGE_ORDER the arch Kconfig
ranges allow (10..13), a static_assert catches larger values.
A per-order split of PGALLOC itself was proposed in 2017 but stalled
over fast path overhead concerns, restricting the counters to the slow
path avoids that overhead entirely while still capturing the
allocations that cause latency.
Link: https://lore.kernel.org/all/1499346271-15653-1-git-send-email-guro@fb.com/
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
---
include/linux/vm_event_item.h | 19 +++++++++++++
mm/page_alloc.c | 7 +++++
mm/vmstat.c | 52 +++++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
index 03fe95f5a020..724561b7e800 100644
--- a/include/linux/vm_event_item.h
+++ b/include/linux/vm_event_item.h
@@ -175,6 +175,25 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
KSTACK_REST,
#endif
#endif /* CONFIG_DEBUG_STACK_USAGE */
+ /*
+ * Per-order allocation statistics: each *_FIRST..*_LAST range
+ * is indexed by allocation order.
+ */
+ PGALLOC_SLOWPATH_ORDER_FIRST,
+ PGALLOC_SLOWPATH_ORDER_LAST =
+ PGALLOC_SLOWPATH_ORDER_FIRST + MAX_PAGE_ORDER,
+ PGALLOC_FAIL_ORDER_FIRST,
+ PGALLOC_FAIL_ORDER_LAST =
+ PGALLOC_FAIL_ORDER_FIRST + MAX_PAGE_ORDER,
+#ifdef CONFIG_COMPACTION
+ /* Direct compaction is never entered for order 0 */
+ COMPACTSTALL_ORDER_FIRST,
+ COMPACTSTALL_ORDER_LAST =
+ COMPACTSTALL_ORDER_FIRST + MAX_PAGE_ORDER - 1,
+ COMPACTSUCCESS_ORDER_FIRST,
+ COMPACTSUCCESS_ORDER_LAST =
+ COMPACTSUCCESS_ORDER_FIRST + MAX_PAGE_ORDER - 1,
+#endif
NR_VM_EVENT_ITEMS
};
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ee902a468c2f..2a2b14f3b516 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4169,6 +4169,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
* count a compaction stall
*/
count_vm_event(COMPACTSTALL);
+ count_vm_event(COMPACTSTALL_ORDER_FIRST + order - 1);
/* Prep a captured page if available */
if (page)
@@ -4184,6 +4185,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
zone->compact_blockskip_flush = false;
compaction_defer_reset(zone, order, true);
count_vm_event(COMPACTSUCCESS);
+ count_vm_event(COMPACTSUCCESS_ORDER_FIRST + order - 1);
return page;
}
@@ -4757,6 +4759,8 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
WARN_ON_ONCE(current->flags & PF_MEMALLOC);
}
+ count_vm_event(PGALLOC_SLOWPATH_ORDER_FIRST + order);
+
restart:
compaction_retries = 0;
no_progress_loops = 0;
@@ -5323,6 +5327,9 @@ struct page *__alloc_frozen_pages_noprof(gfp_t gfp, unsigned int order,
page = NULL;
}
+ if (unlikely(!page))
+ count_vm_event(PGALLOC_FAIL_ORDER_FIRST + order);
+
trace_mm_page_alloc(page, order, alloc_gfp, ac.migratetype);
kmsan_alloc_page(page, order, alloc_gfp);
diff --git a/mm/vmstat.c b/mm/vmstat.c
index f534972f517d..08596edc53ca 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1184,6 +1184,50 @@ int fragmentation_index(struct zone *zone, unsigned int order)
[xx##_MOVABLE] = yy "_movable", \
TEXT_FOR_DEVICE(xx, yy)
+#if MAX_PAGE_ORDER >= 11
+#define TEXT_FOR_ORDER_11(xx, yy) [I((xx) + 11)] = yy "11",
+#else
+#define TEXT_FOR_ORDER_11(xx, yy)
+#endif
+
+#if MAX_PAGE_ORDER >= 12
+#define TEXT_FOR_ORDER_12(xx, yy) [I((xx) + 12)] = yy "12",
+#else
+#define TEXT_FOR_ORDER_12(xx, yy)
+#endif
+
+#if MAX_PAGE_ORDER >= 13
+#define TEXT_FOR_ORDER_13(xx, yy) [I((xx) + 13)] = yy "13",
+#else
+#define TEXT_FOR_ORDER_13(xx, yy)
+#endif
+
+static_assert(MAX_PAGE_ORDER <= 13,
+ "extend TEXT_FOR_ORDER_* for this MAX_PAGE_ORDER");
+
+/*
+ * (xx) + n must resolve to the vm_event_item for order n, so ranges that
+ * start at order 1 pass their *_ORDER_FIRST item minus one.
+ */
+#define TEXTS_FOR_NONZERO_ORDERS(xx, yy) \
+ [I((xx) + 1)] = yy "1", \
+ [I((xx) + 2)] = yy "2", \
+ [I((xx) + 3)] = yy "3", \
+ [I((xx) + 4)] = yy "4", \
+ [I((xx) + 5)] = yy "5", \
+ [I((xx) + 6)] = yy "6", \
+ [I((xx) + 7)] = yy "7", \
+ [I((xx) + 8)] = yy "8", \
+ [I((xx) + 9)] = yy "9", \
+ [I((xx) + 10)] = yy "10", \
+ TEXT_FOR_ORDER_11(xx, yy) \
+ TEXT_FOR_ORDER_12(xx, yy) \
+ TEXT_FOR_ORDER_13(xx, yy)
+
+#define TEXTS_FOR_ORDERS(xx, yy) \
+ [I(xx)] = yy "0", \
+ TEXTS_FOR_NONZERO_ORDERS(xx, yy)
+
const char * const vmstat_text[] = {
/* enum zone_stat_item counters */
#define I(x) (x)
@@ -1488,6 +1532,14 @@ const char * const vmstat_text[] = {
#if THREAD_SIZE > 65536
[I(KSTACK_REST)] = "kstack_rest",
#endif
+#endif
+ TEXTS_FOR_ORDERS(PGALLOC_SLOWPATH_ORDER_FIRST, "pgalloc_slowpath_order")
+ TEXTS_FOR_ORDERS(PGALLOC_FAIL_ORDER_FIRST, "pgalloc_fail_order")
+#ifdef CONFIG_COMPACTION
+ TEXTS_FOR_NONZERO_ORDERS(COMPACTSTALL_ORDER_FIRST - 1,
+ "compact_stall_order")
+ TEXTS_FOR_NONZERO_ORDERS(COMPACTSUCCESS_ORDER_FIRST - 1,
+ "compact_success_order")
#endif
#undef I
#endif /* CONFIG_VM_EVENT_COUNTERS */
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] mm/vmstat: add per-order allocation slow path statistics
2026-08-20 13:36 [PATCH] mm/vmstat: add per-order allocation slow path statistics Daniil Tatianin
@ 2026-08-20 22:49 ` Andrew Morton
2026-08-21 0:24 ` Daniil Tatianin
2026-08-21 7:50 ` Michal Hocko
2026-08-21 7:42 ` kernel test robot
1 sibling, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2026-08-20 22:49 UTC (permalink / raw)
To: Daniil Tatianin
Cc: linux-mm, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, Zi Yan, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Mike Rapoport, linux-kernel
On Thu, 20 Aug 2026 16:36:58 +0300 Daniil Tatianin <d-tatianin@yandex-team.ru> wrote:
> Production incidents caused by bursts of high-order allocations all
> entering direct compaction are currently hard to attribute from
> /proc/vmstat: pgalloc_* has no order breakdown, and compact_stall does
> not say which order stalled. Tracepoints can recover this on a single
> machine, but they are impractical as an always-on fleet-wide monitoring
> source, which is what is needed to correlate latency regressions with
> allocation behavior after the fact.
>
> Add per-order event counters to /proc/vmstat, covering only the
> allocation slow path, so the page allocator fast path is not touched
> at all:
>
> - pgalloc_slowpath_orderN: entries into __alloc_pages_slowpath(),
> counted once per allocation, before the restart loop
> - pgalloc_fail_orderN: allocations that returned NULL to the caller
> (including a successful allocation freed by memcg charge failure)
> - compact_stall_orderN / compact_success_orderN: per-order split of
> the existing direct compaction counters, order 0 is omitted since
> direct compaction is never entered for it
>
> All new counters are purely additive: the existing keys are untouched
> and compact_stall == sum of compact_stall_orderN.
>
> alloc_pages_nolock() is deliberately not counted: it is opportunistic,
> never enters the slow path, and its NULL returns are expected rather
> than failures.
>
> Counter names are generated for any MAX_PAGE_ORDER the arch Kconfig
> ranges allow (10..13), a static_assert catches larger values.
AI review got upset about this:
https://sashiko.dev/#/patchset/20260820133659.712111-1-d-tatianin@yandex-team.ru
> A per-order split of PGALLOC itself was proposed in 2017 but stalled
> over fast path overhead concerns, restricting the counters to the slow
> path avoids that overhead entirely while still capturing the
> allocations that cause latency.
Seems useful, thanks.
It would be easier for others to understand the proposal if the
changelog were to quote some sample /proc/vmstat output.
> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Merging patches from Russian-affiliated individuals is problematic. As
I understand it (not well) it's OK if the contributor's organization
isn't on the US's OFAC list, and it appears that Yandex is not on that
list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/vmstat: add per-order allocation slow path statistics
2026-08-20 22:49 ` Andrew Morton
@ 2026-08-21 0:24 ` Daniil Tatianin
2026-08-21 7:50 ` Michal Hocko
1 sibling, 0 replies; 5+ messages in thread
From: Daniil Tatianin @ 2026-08-21 0:24 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, Zi Yan, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Mike Rapoport, linux-kernel
Thanks for the quick review!
On 8/21/26 1:49 AM, Andrew Morton wrote:
> On Thu, 20 Aug 2026 16:36:58 +0300 Daniil Tatianin <d-tatianin@yandex-team.ru> wrote:
>
>> Production incidents caused by bursts of high-order allocations all
>> entering direct compaction are currently hard to attribute from
>> /proc/vmstat: pgalloc_* has no order breakdown, and compact_stall does
>> not say which order stalled. Tracepoints can recover this on a single
>> machine, but they are impractical as an always-on fleet-wide monitoring
>> source, which is what is needed to correlate latency regressions with
>> allocation behavior after the fact.
>>
>> Add per-order event counters to /proc/vmstat, covering only the
>> allocation slow path, so the page allocator fast path is not touched
>> at all:
>>
>> - pgalloc_slowpath_orderN: entries into __alloc_pages_slowpath(),
>> counted once per allocation, before the restart loop
>> - pgalloc_fail_orderN: allocations that returned NULL to the caller
>> (including a successful allocation freed by memcg charge failure)
>> - compact_stall_orderN / compact_success_orderN: per-order split of
>> the existing direct compaction counters, order 0 is omitted since
>> direct compaction is never entered for it
>>
>> All new counters are purely additive: the existing keys are untouched
>> and compact_stall == sum of compact_stall_orderN.
>>
>> alloc_pages_nolock() is deliberately not counted: it is opportunistic,
>> never enters the slow path, and its NULL returns are expected rather
>> than failures.
>>
>> Counter names are generated for any MAX_PAGE_ORDER the arch Kconfig
>> ranges allow (10..13), a static_assert catches larger values.
> AI review got upset about this:
> https://sashiko.dev/#/patchset/20260820133659.712111-1-d-tatianin@yandex-team.ru
Indeed, it appears PowerPC even does 7 in some cases.
Will fix in v2 in a second.
>
>> A per-order split of PGALLOC itself was proposed in 2017 but stalled
>> over fast path overhead concerns, restricting the counters to the slow
>> path avoids that overhead entirely while still capturing the
>> allocations that cause latency.
> Seems useful, thanks.
>
> It would be easier for others to understand the proposal if the
> changelog were to quote some sample /proc/vmstat output.
Agreed, will attach in v2.
>
>> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
> Merging patches from Russian-affiliated individuals is problematic. As
> I understand it (not well) it's OK if the contributor's organization
> isn't on the US's OFAC list, and it appears that Yandex is not on that
> list.
Can't comment because I don't know either
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/vmstat: add per-order allocation slow path statistics
2026-08-20 22:49 ` Andrew Morton
2026-08-21 0:24 ` Daniil Tatianin
@ 2026-08-21 7:50 ` Michal Hocko
1 sibling, 0 replies; 5+ messages in thread
From: Michal Hocko @ 2026-08-21 7:50 UTC (permalink / raw)
To: Andrew Morton
Cc: Daniil Tatianin, linux-mm, Vlastimil Babka, Suren Baghdasaryan,
Brendan Jackman, Johannes Weiner, Zi Yan, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Mike Rapoport, linux-kernel
On Thu 20-08-26 15:49:13, Andrew Morton wrote:
> On Thu, 20 Aug 2026 16:36:58 +0300 Daniil Tatianin <d-tatianin@yandex-team.ru> wrote:
>
> > Production incidents caused by bursts of high-order allocations all
> > entering direct compaction are currently hard to attribute from
> > /proc/vmstat: pgalloc_* has no order breakdown, and compact_stall does
> > not say which order stalled. Tracepoints can recover this on a single
> > machine, but they are impractical as an always-on fleet-wide monitoring
> > source, which is what is needed to correlate latency regressions with
> > allocation behavior after the fact.
> >
> > Add per-order event counters to /proc/vmstat, covering only the
> > allocation slow path, so the page allocator fast path is not touched
> > at all:
> >
> > - pgalloc_slowpath_orderN: entries into __alloc_pages_slowpath(),
> > counted once per allocation, before the restart loop
> > - pgalloc_fail_orderN: allocations that returned NULL to the caller
> > (including a successful allocation freed by memcg charge failure)
> > - compact_stall_orderN / compact_success_orderN: per-order split of
> > the existing direct compaction counters, order 0 is omitted since
> > direct compaction is never entered for it
> >
> > All new counters are purely additive: the existing keys are untouched
> > and compact_stall == sum of compact_stall_orderN.
> >
> > alloc_pages_nolock() is deliberately not counted: it is opportunistic,
> > never enters the slow path, and its NULL returns are expected rather
> > than failures.
> >
> > Counter names are generated for any MAX_PAGE_ORDER the arch Kconfig
> > ranges allow (10..13), a static_assert catches larger values.
>
> AI review got upset about this:
> https://sashiko.dev/#/patchset/20260820133659.712111-1-d-tatianin@yandex-team.ru
>
> > A per-order split of PGALLOC itself was proposed in 2017 but stalled
> > over fast path overhead concerns, restricting the counters to the slow
> > path avoids that overhead entirely while still capturing the
> > allocations that cause latency.
>
> Seems useful, thanks.
I would rather not put that into ever growing vmstat and bloat it even
more. Most users simply do not care about that level of details. What do
we expect next, per migrate target/order stats because somebody might be
interested to debug fragmentation better?
Would it be sufficient to have a dedicated debugfs interface? The
argument about tracepoints scalability is also rather weak. There are
examples of successfull bpf, tracing deployments at large scales so this
certainly is not a new problem to tackle.
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/vmstat: add per-order allocation slow path statistics
2026-08-20 13:36 [PATCH] mm/vmstat: add per-order allocation slow path statistics Daniil Tatianin
2026-08-20 22:49 ` Andrew Morton
@ 2026-08-21 7:42 ` kernel test robot
1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-08-21 7:42 UTC (permalink / raw)
To: Daniil Tatianin, Andrew Morton
Cc: oe-kbuild-all, Linux Memory Management List, Daniil Tatianin,
Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, Zi Yan, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Mike Rapoport, linux-kernel
Hi Daniil,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.2]
[cannot apply to akpm-mm/mm-everything next-20260819]
[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/Daniil-Tatianin/mm-vmstat-add-per-order-allocation-slow-path-statistics/20260820-163658
base: linus/master
patch link: https://lore.kernel.org/r/20260820133659.712111-1-d-tatianin%40yandex-team.ru
patch subject: [PATCH] mm/vmstat: add per-order allocation slow path statistics
config: sh-defconfig (https://download.01.org/0day-ci/archive/20260821/202608211553.F2rJl3PW-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260821/202608211553.F2rJl3PW-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608211553.F2rJl3PW-lkp@intel.com/
All errors (new ones prefixed by >>):
1537 | TEXTS_FOR_ORDERS(PGALLOC_FAIL_ORDER_FIRST, "pgalloc_fail_order")
| ^~~~~~~~~~~~~~~~
mm/vmstat.c:1537:52: warning: initialized field overwritten [-Woverride-init]
1537 | TEXTS_FOR_ORDERS(PGALLOC_FAIL_ORDER_FIRST, "pgalloc_fail_order")
| ^~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1537:9: note: in expansion of macro 'TEXTS_FOR_ORDERS'
1537 | TEXTS_FOR_ORDERS(PGALLOC_FAIL_ORDER_FIRST, "pgalloc_fail_order")
| ^~~~~~~~~~~~~~~~
mm/vmstat.c:1537:52: note: (near initialization for 'vmstat_text[156]')
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1537:9: note: in expansion of macro 'TEXTS_FOR_ORDERS'
1537 | TEXTS_FOR_ORDERS(PGALLOC_FAIL_ORDER_FIRST, "pgalloc_fail_order")
| ^~~~~~~~~~~~~~~~
mm/vmstat.c:1540:34: warning: initialized field overwritten [-Woverride-init]
1540 | "compact_stall_order")
| ^~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1213:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1213 | [I((xx) + 1)] = yy "1", \
| ^~
mm/vmstat.c:1540:34: note: (near initialization for 'vmstat_text[160]')
mm/vmstat.c:1213:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1213 | [I((xx) + 1)] = yy "1", \
| ^~
mm/vmstat.c:1540:34: warning: initialized field overwritten [-Woverride-init]
1540 | "compact_stall_order")
| ^~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1214:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1214 | [I((xx) + 2)] = yy "2", \
| ^~
mm/vmstat.c:1540:34: note: (near initialization for 'vmstat_text[161]')
mm/vmstat.c:1214:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1214 | [I((xx) + 2)] = yy "2", \
| ^~
mm/vmstat.c:1540:34: warning: initialized field overwritten [-Woverride-init]
1540 | "compact_stall_order")
| ^~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1540:34: note: (near initialization for 'vmstat_text[162]')
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1540:34: warning: initialized field overwritten [-Woverride-init]
1540 | "compact_stall_order")
| ^~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1216:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1216 | [I((xx) + 4)] = yy "4", \
| ^~
mm/vmstat.c:1540:34: note: (near initialization for 'vmstat_text[163]')
mm/vmstat.c:1216:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1216 | [I((xx) + 4)] = yy "4", \
| ^~
mm/vmstat.c:1542:34: warning: initialized field overwritten [-Woverride-init]
1542 | "compact_success_order")
| ^~~~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1213:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1213 | [I((xx) + 1)] = yy "1", \
| ^~
mm/vmstat.c:1542:34: note: (near initialization for 'vmstat_text[166]')
mm/vmstat.c:1213:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1213 | [I((xx) + 1)] = yy "1", \
| ^~
mm/vmstat.c:1542:34: warning: initialized field overwritten [-Woverride-init]
1542 | "compact_success_order")
| ^~~~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1214:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1214 | [I((xx) + 2)] = yy "2", \
| ^~
mm/vmstat.c:1542:34: note: (near initialization for 'vmstat_text[167]')
mm/vmstat.c:1214:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1214 | [I((xx) + 2)] = yy "2", \
| ^~
mm/vmstat.c:1542:34: warning: initialized field overwritten [-Woverride-init]
1542 | "compact_success_order")
| ^~~~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1542:34: note: (near initialization for 'vmstat_text[168]')
mm/vmstat.c:1215:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1215 | [I((xx) + 3)] = yy "3", \
| ^~
mm/vmstat.c:1542:34: warning: initialized field overwritten [-Woverride-init]
1542 | "compact_success_order")
| ^~~~~~~~~~~~~~~~~~~~~~~
mm/vmstat.c:1216:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1216 | [I((xx) + 4)] = yy "4", \
| ^~
mm/vmstat.c:1542:34: note: (near initialization for 'vmstat_text[169]')
mm/vmstat.c:1216:25: note: in definition of macro 'TEXTS_FOR_NONZERO_ORDERS'
1216 | [I((xx) + 4)] = yy "4", \
| ^~
In file included from <command-line>:
mm/vmstat.c: In function 'vmstat_start':
>> include/linux/compiler_types.h:702:45: error: call to '__compiletime_assert_467' declared with attribute error: BUILD_BUG_ON failed: ARRAY_SIZE(vmstat_text) != NR_VMSTAT_ITEMS
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:683:25: note: in definition of macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:51:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
mm/vmstat.c:1941:9: note: in expansion of macro 'BUILD_BUG_ON'
1941 | BUILD_BUG_ON(ARRAY_SIZE(vmstat_text) != NR_VMSTAT_ITEMS);
| ^~~~~~~~~~~~
vim +/__compiletime_assert_467 +702 include/linux/compiler_types.h
eb5c2d4b45e3d2d Will Deacon 2020-07-21 688
eb5c2d4b45e3d2d Will Deacon 2020-07-21 689 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 690 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 691
eb5c2d4b45e3d2d Will Deacon 2020-07-21 692 /**
eb5c2d4b45e3d2d Will Deacon 2020-07-21 693 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 694 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2d Will Deacon 2020-07-21 695 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 696 *
eb5c2d4b45e3d2d Will Deacon 2020-07-21 697 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 698 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 699 * compiler has support to do so.
eb5c2d4b45e3d2d Will Deacon 2020-07-21 700 */
eb5c2d4b45e3d2d Will Deacon 2020-07-21 701 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 @702 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 703
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-21 7:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 13:36 [PATCH] mm/vmstat: add per-order allocation slow path statistics Daniil Tatianin
2026-08-20 22:49 ` Andrew Morton
2026-08-21 0:24 ` Daniil Tatianin
2026-08-21 7:50 ` Michal Hocko
2026-08-21 7:42 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox