Skip to content

Commit 264a88c

Browse files
honggyukimakpm00
authored andcommitted
mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to "interleave_hit"
Commit fa3bea4 introduced MPOL_WEIGHTED_INTERLEAVE but it missed adding its counter to "interleave_hit" of numastat, which is located at /sys/devices/system/node/nodeN/ directory. It'd be better to add weighted interleving counter info to the existing "interleave_hit" instead of introducing a new counter "weighted_interleave_hit". Link: https://lkml.kernel.org/r/20241227095737.645-1-honggyu.kim@sk.com Fixes: fa3bea4 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving") Signed-off-by: Honggyu Kim <honggyu.kim@sk.com> Reviewed-by: Gregory Price <gourry@gourry.net> Reviewed-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Yunjeong Mun <yunjeong.mun@sk.com> Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 2bff77c commit 264a88c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mm/mempolicy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,8 @@ struct page *alloc_pages_mpol_noprof(gfp_t gfp, unsigned int order,
22682268

22692269
page = __alloc_pages_noprof(gfp, order, nid, nodemask);
22702270

2271-
if (unlikely(pol->mode == MPOL_INTERLEAVE) && page) {
2271+
if (unlikely(pol->mode == MPOL_INTERLEAVE ||
2272+
pol->mode == MPOL_WEIGHTED_INTERLEAVE) && page) {
22722273
/* skip NUMA_INTERLEAVE_HIT update if numa stats is disabled */
22732274
if (static_branch_likely(&vm_numa_stat_key) &&
22742275
page_to_nid(page) == nid) {

0 commit comments

Comments
 (0)