Hi Aruna, kernel test robot noticed the following build warnings: [auto build test WARNING on 2b820b576dfc4aa9b65f18b68f468cb5b38ece84] url: https://github.com/intel-lab-lkp/linux/commits/Aruna-Ramakrishna/mm-mempolicy-Make-alloc_pages_mpol_noprof-static/20240806-004215 base: 2b820b576dfc4aa9b65f18b68f468cb5b38ece84 patch link: https://lore.kernel.org/r/20240805163120.5971-3-aruna.ramakrishna%40oracle.com patch subject: [PATCH 3/4] mm/mempolicy: Remove alloc_pages_mpol_noprof() config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20240807/202408072152.nuStNgLu-lkp@xxxxxxxxx/config) compiler: loongarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240807/202408072152.nuStNgLu-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408072152.nuStNgLu-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> mm/mempolicy.c:2221: warning: expecting prototype for folio_alloc_mpol_noprof(). Prototype was for folio_alloc_mpol() instead vim +2221 mm/mempolicy.c 4c54d94908e089 Feng Tang 2021-09-02 2208 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2209 /** 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2210 * folio_alloc_mpol_noprof - Allocate pages according to NUMA mempolicy. eb350739605107 Matthew Wilcox (Oracle 2021-04-29 2211) * @gfp: GFP flags. 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2212 * @order: Order of the folio allocation. ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2213 * @pol: Pointer to the NUMA mempolicy. ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2214 * @ilx: Index for interleave mempolicy (also distinguishes alloc_pages()). ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2215 * @nid: Preferred node (usually numa_node_id() but @mpol may override it). eb350739605107 Matthew Wilcox (Oracle 2021-04-29 2216) * 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2217 * Return: The folio on success or NULL if allocation fails. ^1da177e4c3f41 Linus Torvalds 2005-04-16 2218 */ 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2219 struct folio *folio_alloc_mpol_noprof(gfp_t gfp, unsigned int order, ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2220 struct mempolicy *pol, pgoff_t ilx, int nid) ^1da177e4c3f41 Linus Torvalds 2005-04-16 @2221 { ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2222 nodemask_t *nodemask; 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2223 struct folio *folio; adf88aa8ea7ff1 Matthew Wilcox (Oracle 2022-05-12 2224) 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2225 gfp |= __GFP_COMP; ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2226 nodemask = policy_nodemask(gfp, pol, ilx, &nid); 4c54d94908e089 Feng Tang 2021-09-02 2227 ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2228 if (pol->mode == MPOL_PREFERRED_MANY) 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2229 return page_rmappable_folio( 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2230 alloc_pages_preferred_many(gfp, order, 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2231 nid, nodemask)); 19deb7695e072d David Rientjes 2019-09-04 2232 ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2233 if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2234 /* filter "hugepage" allocation, unless from alloc_pages() */ ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2235 order == HPAGE_PMD_ORDER && ilx != NO_INTERLEAVE_INDEX) { 19deb7695e072d David Rientjes 2019-09-04 2236 /* 19deb7695e072d David Rientjes 2019-09-04 2237 * For hugepage allocation and non-interleave policy which 19deb7695e072d David Rientjes 2019-09-04 2238 * allows the current node (or other explicitly preferred 19deb7695e072d David Rientjes 2019-09-04 2239 * node) we only try to allocate from the current/preferred 19deb7695e072d David Rientjes 2019-09-04 2240 * node and don't fall back to other nodes, as the cost of 19deb7695e072d David Rientjes 2019-09-04 2241 * remote accesses would likely offset THP benefits. 19deb7695e072d David Rientjes 2019-09-04 2242 * b27abaccf8e8b0 Dave Hansen 2021-09-02 2243 * If the policy is interleave or does not allow the current 19deb7695e072d David Rientjes 2019-09-04 2244 * node in its nodemask, we allocate the standard way. 19deb7695e072d David Rientjes 2019-09-04 2245 */ ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2246 if (pol->mode != MPOL_INTERLEAVE && fa3bea4e1f8202 Gregory Price 2024-02-02 2247 pol->mode != MPOL_WEIGHTED_INTERLEAVE && ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2248 (!nodemask || node_isset(nid, *nodemask))) { cc638f329ef605 Vlastimil Babka 2020-01-13 2249 /* cc638f329ef605 Vlastimil Babka 2020-01-13 2250 * First, try to allocate THP only on local node, but cc638f329ef605 Vlastimil Babka 2020-01-13 2251 * don't reclaim unnecessarily, just compact. cc638f329ef605 Vlastimil Babka 2020-01-13 2252 */ 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2253 folio = __folio_alloc_node_noprof( 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2254 gfp | __GFP_THISNODE | __GFP_NORETRY, 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2255 order, nid); 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2256 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2257 if (folio || !(gfp & __GFP_DIRECT_RECLAIM)) 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2258 return folio; 76e654cc91bbe6 David Rientjes 2019-09-04 2259 /* 76e654cc91bbe6 David Rientjes 2019-09-04 2260 * If hugepage allocations are configured to always 76e654cc91bbe6 David Rientjes 2019-09-04 2261 * synchronous compact or the vma has been madvised 76e654cc91bbe6 David Rientjes 2019-09-04 2262 * to prefer hugepage backing, retry allowing remote cc638f329ef605 Vlastimil Babka 2020-01-13 2263 * memory with both reclaim and compact as well. 76e654cc91bbe6 David Rientjes 2019-09-04 2264 */ ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2265 } ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2266 } 76e654cc91bbe6 David Rientjes 2019-09-04 2267 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2268 folio = __folio_alloc_noprof(gfp, order, nid, nodemask); ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2269 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2270 if (unlikely(pol->mode == MPOL_INTERLEAVE) && folio) { ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2271 /* skip NUMA_INTERLEAVE_HIT update if numa stats is disabled */ ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2272 if (static_branch_likely(&vm_numa_stat_key) && 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2273 folio_nid(folio) == nid) { ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2274 preempt_disable(); 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2275 __count_numa_event(folio_zone(folio), NUMA_INTERLEAVE_HIT); ddc1a5cbc05dc6 Hugh Dickins 2023-10-19 2276 preempt_enable(); 19deb7695e072d David Rientjes 2019-09-04 2277 } 356ff8a9a78fb3 David Rientjes 2018-12-07 2278 } 356ff8a9a78fb3 David Rientjes 2018-12-07 2279 116fd18cc881fc Aruna Ramakrishna 2024-08-05 2280 return folio; a19621ed4e0ac9 Kefeng Wang 2024-05-15 2281 } a19621ed4e0ac9 Kefeng Wang 2024-05-15 2282 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki