From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8454037A493 for ; Thu, 23 Jul 2026 23:58:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784851088; cv=none; b=ekD29Pdw7z66HUHz8ZTZ3M8sEBk+eMeatvJXs10+IG4E6bSeHpmixs43Ol49Gz/d98MBR+Cg22SDNawg5yClWXkCzB/4ihiX5WYgZcm/tSh22f1U55ORDgmdp+cDkM116p98cGy1Ybwxo5bYaqMhMbJH2fJU7D16YCuClHArM2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784851088; c=relaxed/simple; bh=1t/Ym9qbZCzzcld5Cdn5d/BfyJzj6xHPihKt63yyZrg=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=KsWkTNDJfGdk/911jVBP0qy8R6DXkanB7KFbPU0fsGntiBAh+bSac9aPMM+Q5zNnti+wi7KVJMz8YM7MNT7dpwVy2KJUqU4CqQnvvoV1cUYLr9iQqcf9dPPh6WXotG5yRgASTCOoFVfb/W9ZQs6hLeFLIaiJ3ogMJ9flEcU037E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=ijx0TLq7; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ijx0TLq7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AF321F000E9; Thu, 23 Jul 2026 23:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1784851085; bh=avvPm+MSiYqhBmDj/gEoTUbsHIPoE2kqbnWnOuNf/hU=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ijx0TLq7arHCpHcGPuERlv98vZmIlAej1Bt/vkO6kJd/dZ0YlYelLSXztDWM92Lcs xnaUOnm5J4mha3vCaQwyLXPYREQQZy0pTX9r7Jwm0IERkJfmyvodXXcgokUttZRuER 7VxUIas/CSdoeTgt3LTIKdPuRV5BybBVhRfV4UDk= Date: Thu, 23 Jul 2026 16:58:04 -0700 From: Andrew Morton To: Ridong Cc: Johannes Weiner , David Hildenbrand , Michal Hocko , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Kairui Song , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Yu Zhao , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen Subject: Re: [PATCH] mm/mglru: fix memcg protection for global proactive reclaim Message-Id: <20260723165804.f4899595c0523bb16af292fd@linux-foundation.org> In-Reply-To: <20260723130559.2343690-1-ridong.chen@linux.dev> References: <20260723130559.2343690-1-ridong.chen@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Thu, 23 Jul 2026 21:05:59 +0800 Ridong wrote: > memory.min/low is silently bypassed for MGLRU during global proactive > reclaim (writing to the root memory.reclaim). It can be reproduced as > follows: > > ... > > Factor the tree traversal out into update_memcg_protection() and call > it from lru_gen_shrink_node() for the non-kswapd path, so the protection > is computed before shrinking. kswapd keeps computing it in > lru_gen_age_node(), which also needs it for the min_ttl OOM check. > > Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Do we want cc:stable on this fix? Sashiko said a couple of things - the memcg ref leak looks real: https://sashiko.dev/#/patchset/20260723130559.2343690-1-ridong.chen@linux.dev