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/[email protected] Fixes: fa3bea4 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving") Signed-off-by: Honggyu Kim <[email protected]> Reviewed-by: Gregory Price <[email protected]> Reviewed-by: Hyeonggon Yoo <[email protected]> Tested-by: Yunjeong Mun <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 2bff77c commit 264a88c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)