linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <hyeonggon.yoo@sk.com>
To: Honggyu Kim <honggyu.kim@sk.com>, Gregory Price <gourry@gourry.net>
Cc: kernel_team@skhynix.com, 42.hyeyoo@gmail.com,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yunjeong Mun <yunjeong.mun@sk.com>
Subject: Re: [PATCH] mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to "interleave_hit"
Date: Mon, 30 Dec 2024 10:22:24 +0900	[thread overview]
Message-ID: <50f2f968-df8f-4067-8e19-4d1e5b8cbbfb@sk.com> (raw)
In-Reply-To: <20241227095737.645-1-honggyu.kim@sk.com>



On 2024-12-27 6:57 AM, Honggyu Kim wrote:
> The fa3bea4e1f82 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".
> 
> Fixes: fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving")
> Cc: Gregory Price <gourry@gourry.net>
> Cc: Andi Kleen <ak@linux.intel.com>
> Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
> ---
>   mm/mempolicy.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 04f35659717a..162407fbf2bc 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -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) {
> 
> base-commit: 4bbf9020becbfd8fc2c3da790855b7042fad455b

[+Cc Andrew]

Looks good to me,
Reviewed-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com>

We discovered that interleave_hit is not correctly accounted
while testing MPOL_WEIGHTED_INTERLEAVE on libnuma and this patch
fixes the issue.

Tested-by: Yunjeong Mun <yunjeong.mun@sk.com>

For reference:
https://github.com/numactl/numactl/pull/238#issuecomment-2563532910

--
Hyeonggon


  parent reply	other threads:[~2024-12-30  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-27  9:57 Honggyu Kim
2024-12-27 15:37 ` Gregory Price
2024-12-30  1:22 ` Hyeonggon Yoo [this message]
2024-12-31  3:08   ` Honggyu Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50f2f968-df8f-4067-8e19-4d1e5b8cbbfb@sk.com \
    --to=hyeonggon.yoo@sk.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gourry@gourry.net \
    --cc=honggyu.kim@sk.com \
    --cc=kernel_team@skhynix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yunjeong.mun@sk.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox