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: <aPcjnKAapap5jrK-@hyeyoo>
Date: Tue, 21 Oct 2025 15:09:32 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Qi Zheng <qi.zheng@...ux.dev>
Cc: hannes@...xchg.org, hughd@...gle.com, mhocko@...e.com,
        roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
        muchun.song@...ux.dev, david@...hat.com, lorenzo.stoakes@...cle.com,
        ziy@...dia.com, baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com,
        npache@...hat.com, ryan.roberts@....com, dev.jain@....com,
        baohua@...nel.org, lance.yang@...ux.dev, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        cgroups@...r.kernel.org, Qi Zheng <zhengqi.arch@...edance.com>
Subject: Re: [PATCH v5 4/4] mm: thp: reparent the split queue during memcg
 offline

On Wed, Oct 15, 2025 at 02:35:33PM +0800, Qi Zheng wrote:
> From: Qi Zheng <zhengqi.arch@...edance.com>
> 
> Similar to list_lru, the split queue is relatively independent and does
> not need to be reparented along with objcg and LRU folios (holding
> objcg lock and lru lock). So let's apply the similar mechanism as list_lru
> to reparent the split queue separately when memcg is offine.
> 
> This is also a preparation for reparenting LRU folios.
> 
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
> Acked-by: Zi Yan <ziy@...dia.com>
> Reviewed-by: Muchun Song <muchun.song@...ux.dev>
> Acked-by: David Hildenbrand <david@...hat.com>
> Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
> ---

Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@...cle.com>

with a question:

> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index e850bc10da3e2..9323039418201 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1117,8 +1117,19 @@ static struct deferred_split *split_queue_lock(int nid, struct mem_cgroup *memcg
>  {
>  	struct deferred_split *queue;
>  
> +retry:
>  	queue = memcg_split_queue(nid, memcg);
>  	spin_lock(&queue->split_queue_lock);
> +	/*
> +	 * There is a period between setting memcg to dying and reparenting
> +	 * deferred split queue, and during this period the THPs in the deferred
> +	 * split queue will be hidden from the shrinker side.
> +	 */

You mean it will be hidden if the shrinker bit is not set for the node
in the parent memcg, right?

-- 
Cheers,
Harry / Hyeonggon


> +	if (unlikely(memcg_is_dying(memcg))) {
> +		spin_unlock(&queue->split_queue_lock);
> +		memcg = parent_mem_cgroup(memcg);
> +		goto retry;
> +	}
>  	return queue;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ