Commit 264a88ca authored by Honggyu Kim's avatar Honggyu Kim Committed by Andrew Morton
Browse files

mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to "interleave_hit"

Commit fa3bea4e 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: fa3bea4e ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving")
Signed-off-by: default avatarHonggyu Kim <honggyu.kim@sk.com>
Reviewed-by: default avatarGregory Price <gourry@gourry.net>
Reviewed-by: default avatarHyeonggon Yoo <hyeonggon.yoo@sk.com>
Tested-by: default avatarYunjeong Mun <yunjeong.mun@sk.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2bff77c6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2268,7 +2268,8 @@ struct page *alloc_pages_mpol_noprof(gfp_t gfp, unsigned int order,

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

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