[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202509260132.awvdNKqF-lkp@intel.com>
Date: Fri, 26 Sep 2025 18:34:06 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Joshua Hahn <joshua.hahnjy@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
Linux Memory Management List <linux-mm@...ck.org>,
Chris Mason <chris.mason@...ionio.com>,
Kiryl Shutsemau <kirill@...temov.name>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Brendan Jackman <jackmanb@...gle.com>,
David Hildenbrand <david@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Michal Hocko <mhocko@...e.com>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>, Zi Yan <ziy@...dia.com>,
linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH v2 1/4] mm/page_alloc/vmstat: Simplify
refresh_cpu_vm_stats change detection
Hi Joshua,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Joshua-Hahn/mm-page_alloc-vmstat-Simplify-refresh_cpu_vm_stats-change-detection/20250925-044532
base: 097a6c336d0080725c626fda118ecfec448acd0f
patch link: https://lore.kernel.org/r/20250924204409.1706524-2-joshua.hahnjy%40gmail.com
patch subject: [PATCH v2 1/4] mm/page_alloc/vmstat: Simplify refresh_cpu_vm_stats change detection
config: mips-randconfig-r073-20250925 (https://download.01.org/0day-ci/archive/20250926/202509260132.awvdNKqF-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project cafc064fc7a96b3979a023ddae1da2b499d6c954)
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202509260132.awvdNKqF-lkp@intel.com/
smatch warnings:
mm/page_alloc.c:2591 decay_pcp_high() error: uninitialized symbol 'todo'.
vim +/todo +2591 mm/page_alloc.c
06fb80866d37b0 Joshua Hahn 2025-09-24 2564 bool decay_pcp_high(struct zone *zone, struct per_cpu_pages *pcp)
51a755c56dc05a Ying Huang 2023-10-16 2565 {
51a755c56dc05a Ying Huang 2023-10-16 2566 int high_min, to_drain, batch;
06fb80866d37b0 Joshua Hahn 2025-09-24 2567 bool todo;
needs to be initialized to false.
51a755c56dc05a Ying Huang 2023-10-16 2568
51a755c56dc05a Ying Huang 2023-10-16 2569 high_min = READ_ONCE(pcp->high_min);
51a755c56dc05a Ying Huang 2023-10-16 2570 batch = READ_ONCE(pcp->batch);
51a755c56dc05a Ying Huang 2023-10-16 2571 /*
51a755c56dc05a Ying Huang 2023-10-16 2572 * Decrease pcp->high periodically to try to free possible
51a755c56dc05a Ying Huang 2023-10-16 2573 * idle PCP pages. And, avoid to free too many pages to
51a755c56dc05a Ying Huang 2023-10-16 2574 * control latency. This caps pcp->high decrement too.
51a755c56dc05a Ying Huang 2023-10-16 2575 */
51a755c56dc05a Ying Huang 2023-10-16 2576 if (pcp->high > high_min) {
51a755c56dc05a Ying Huang 2023-10-16 2577 pcp->high = max3(pcp->count - (batch << CONFIG_PCP_BATCH_SCALE_MAX),
51a755c56dc05a Ying Huang 2023-10-16 2578 pcp->high - (pcp->high >> 3), high_min);
51a755c56dc05a Ying Huang 2023-10-16 2579 if (pcp->high > high_min)
06fb80866d37b0 Joshua Hahn 2025-09-24 2580 todo = true;
51a755c56dc05a Ying Huang 2023-10-16 2581 }
51a755c56dc05a Ying Huang 2023-10-16 2582
51a755c56dc05a Ying Huang 2023-10-16 2583 to_drain = pcp->count - pcp->high;
51a755c56dc05a Ying Huang 2023-10-16 2584 if (to_drain > 0) {
51a755c56dc05a Ying Huang 2023-10-16 2585 spin_lock(&pcp->lock);
51a755c56dc05a Ying Huang 2023-10-16 2586 free_pcppages_bulk(zone, to_drain, pcp, 0);
51a755c56dc05a Ying Huang 2023-10-16 2587 spin_unlock(&pcp->lock);
06fb80866d37b0 Joshua Hahn 2025-09-24 2588 todo = true;
51a755c56dc05a Ying Huang 2023-10-16 2589 }
51a755c56dc05a Ying Huang 2023-10-16 2590
51a755c56dc05a Ying Huang 2023-10-16 @2591 return todo;
51a755c56dc05a Ying Huang 2023-10-16 2592 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists