]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/page_alloc: split per cpu page lists and zone stats -fix
authorMel Gorman <mgorman@techsingularity.net>
Wed, 2 Jun 2021 03:52:36 +0000 (13:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 2 Jun 2021 03:52:36 +0000 (13:52 +1000)
mm/ is not W=1 clean for allnoconfig but the patch "mm/page_alloc: Split
per cpu page lists and zone stats" makes it worse with the following
warning

  mm/vmstat.c: In function `zoneinfo_show_print':
  mm/vmstat.c:1698:28: warning: variable `pzstats' set but not used [-Wunused-but-set-variable]
     struct per_cpu_zonestat *pzstats;
                              ^~~~~~~

This is a fix to the mmotm patch
mm-page_alloc-split-per-cpu-page-lists-and-zone-stats.patch.

Link: https://lkml.kernel.org/r/20210514144622.GA3735@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/vmstat.c

index e3bcd317ea550d5c505d6c999cbdaa7f6821df37..a2c3f58253bece12be4f63a7c6fb3198d8b2a0de 100644 (file)
@@ -1695,10 +1695,9 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
        seq_printf(m, "\n  pagesets");
        for_each_online_cpu(i) {
                struct per_cpu_pages *pcp;
-               struct per_cpu_zonestat *pzstats;
+               struct per_cpu_zonestat __maybe_unused *pzstats;
 
                pcp = per_cpu_ptr(zone->per_cpu_pageset, i);
-               pzstats = per_cpu_ptr(zone->per_cpu_zonestats, i);
                seq_printf(m,
                           "\n    cpu: %i"
                           "\n              count: %i"
@@ -1709,6 +1708,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
                           pcp->high,
                           pcp->batch);
 #ifdef CONFIG_SMP
+               pzstats = per_cpu_ptr(zone->per_cpu_zonestats, i);
                seq_printf(m, "\n  vm stats threshold: %d",
                                pzstats->stat_threshold);
 #endif