lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50f2f968-df8f-4067-8e19-4d1e5b8cbbfb@sk.com>
Date: Mon, 30 Dec 2024 10:22:24 +0900
From: Hyeonggon Yoo <hyeonggon.yoo@...com>
To: Honggyu Kim <honggyu.kim@...com>, Gregory Price <gourry@...rry.net>
Cc: kernel_team@...ynix.com, 42.hyeyoo@...il.com,
 "linux-mm@...ck.org" <linux-mm@...ck.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Andi Kleen <ak@...ux.intel.com>, Andrew Morton <akpm@...ux-foundation.org>,
 Yunjeong Mun <yunjeong.mun@...com>
Subject: Re: [PATCH] mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to
 "interleave_hit"



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@...rry.net>
> Cc: Andi Kleen <ak@...ux.intel.com>
> Signed-off-by: Honggyu Kim <honggyu.kim@...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@...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@...com>

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

--
Hyeonggon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ