From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 565C043147 for ; Wed, 25 Mar 2026 00:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398488; cv=none; b=vGBa9MiDRAwf8GLKVzBdZKqKOEEtgyMcnjvR5TJyEVjwZIusGdZGBZF0ZI9zyN361cEV54zTCJ762JXDIMhDv42Oia6LCUeGdn6DJttsbNsywX9c4KZ1jqUU6iOJE5ZEZYzQKZI+gtKnxepD26kQWDHk7M8wXFwgQjl0BzXrTYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398488; c=relaxed/simple; bh=TvloSL61KzQ9iU/afN4Rt1hOopTR6E2Gjkg+FYAiOb0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V+tyRikuJ9Hk4X4YeaQzXtSRFLf3ueaBbwNiXnFKkG18ROYHILyH6NukX15TjfnqN4/+JVgXHRe3tghpI4uWW54XLUeVfZIEHplVXGL3tqvW3ZqGUHg244lanLOUZYBdu6NPBV3QGMOZXDIuwE3kp9EnONGnXAflhxOTabq5Kgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DPyAlTqO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DPyAlTqO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97420C19424; Wed, 25 Mar 2026 00:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774398488; bh=TvloSL61KzQ9iU/afN4Rt1hOopTR6E2Gjkg+FYAiOb0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DPyAlTqOL2tV9cr4DTV8nrok9SlazMYfMm8u08LNqfQlvOy7s7zL23wyecMM1705Q MvKcQvzz+8+Yo78A5Kok4/jcxgHsuhXjL0z2vCNMV99AVX3NlnEyPL8/jmVM0nF+th 3tiQdovxIuOwKm817E9S1AgrL/Q1F6RaaBQHn45DUV8tlmqWpSIjXsDFgt/BfFGfqz 2iiFOTPDMM4X53D0axXL4siHU3bfa00uoRkSIVTUkGv/cEpPPvLIMYrE9HaRmE71Lp qLqf0aRTO9BgDUfjGVBeFqSHZUhFaknTWuvLifb+FFTvarbI+TyRg7CqU36qxPJX8n 14afEiXtUezTw== Date: Wed, 25 Mar 2026 09:28:06 +0900 From: "Harry Yoo (Oracle)" To: Qi Zheng Cc: hannes@cmpxchg.org, hughd@google.com, mhocko@suse.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, david@kernel.org, lorenzo.stoakes@oracle.com, ziy@nvidia.com, harry.yoo@oracle.com, yosry.ahmed@linux.dev, imran.f.khan@oracle.com, kamalesh.babulal@oracle.com, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, chenridong@huaweicloud.com, mkoutny@suse.com, akpm@linux-foundation.org, hamzamahfooz@linux.microsoft.com, apais@linux.microsoft.com, lance.yang@linux.dev, bhe@redhat.com, usamaarif642@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng Subject: Re: [PATCH] fix: mm: vmscan: prepare for reparenting MGLRU folios Message-ID: References: <20260324114937.28569-1-qi.zheng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260324114937.28569-1-qi.zheng@linux.dev> On Tue, Mar 24, 2026 at 07:49:37PM +0800, Qi Zheng wrote: > From: Qi Zheng > > The lru_to_folio() returns the tail folio, and the lruvec_add_folio() adds > folio to the head, so the tail page is colder. Since we always assume that > the folios in child memcg (about to go offline) are always colder, we > should use list_splice_tail_init() to reparent the child folios to the > tail of the lru list of parent memcg. > > Reported-by: Harry Yoo > Signed-off-by: Qi Zheng > --- Reviewed-by: Harry Yoo -- Cheers, Harry / Hyeonggon