From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) (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 6BE6A242D62 for ; Sat, 28 Mar 2026 02:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.118 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774665530; cv=none; b=q1JVvMWN1L+HM/Lv0CBnmXlUGxNH5UZpIERwPBD8ju2cPuX5El2YoXzzYeD/i1St5ot1gWZa5CzbWrhq90yhiFd8rzL30oyH+FueONvTstB0OWkiNJa0aKCP5TJRnCBH1KikYdHupPMnj+LQNGa4dKUSUm0ZL4EGfXwf2WvS6pE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774665530; c=relaxed/simple; bh=pBLY2hL+OXWEB3yKUoU2OGm1cKf7nqOa9yhkRo3xixM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NwdTk2QQzO1gXOJiW+iBTrNMXjRn3VYqaKc1gPKJrn+7gWyvsCqsf3xZK8DWVu8kASTtOu2cGlymGRk/iu65yZd69VoggsvVqfS47hrCrh31iyXY89sHhJEPzykO4h9xemJ8eYbxTdsDlh3hIWhB0bmF7VPQ9eap1uKo/LfDmb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=hh21/INY; arc=none smtp.client-ip=115.124.30.118 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="hh21/INY" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1774665518; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=8DOt/S8u7uVbI1sNGa1m5LuFvnKwYtZQpZgs6y83o4A=; b=hh21/INYtGnUsmJ7O8zR9ngygzmyewFzfDfTpfYVvB33AdRyH28AnNswBlpbuMVgg8zhQRZMFQfDh+nmtdN1IXQbYJokWj2lPB0athmfcuVNOt6qxEoZZ8cjEQZT53Vtsi66j5TGznZhBcCFrNxsn5c3cghoXBQHHg5H5eoSBio= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R861e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0X.pba0A_1774665517; Received: from 30.42.98.36(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X.pba0A_1774665517 cluster:ay36) by smtp.aliyun-inc.com; Sat, 28 Mar 2026 10:38:38 +0800 Message-ID: Date: Sat, 28 Mar 2026 10:38:34 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: vmscan: fix dirty folios throttling on cgroup v1 for MGLRU To: Andrew Morton Cc: hannes@cmpxchg.org, david@kernel.org, mhocko@kernel.org, zhengqi.arch@bytedance.com, shakeel.butt@linux.dev, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, ljs@kernel.org, baohua@kernel.org, kasong@tencent.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <3445af0f09e8ca945492e052e82594f8c4f2e2f6.1774606060.git.baolin.wang@linux.alibaba.com> <20260327083042.da4fd1586ab8aa2f639393b0@linux-foundation.org> From: Baolin Wang In-Reply-To: <20260327083042.da4fd1586ab8aa2f639393b0@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/27/26 11:30 PM, Andrew Morton wrote: > On Fri, 27 Mar 2026 18:21:08 +0800 Baolin Wang wrote: > >> The balance_dirty_pages() won't do the dirty folios throttling on cgroupv1. >> See commit 9badce000e2c ("cgroup, writeback: don't enable cgroup writeback >> on traditional hierarchies"). >> >> Moreover, after commit 6b0dfabb3555 ("fs: Remove aops->writepage"), we no >> longer attempt to write back filesystem folios through reclaim. >> >> On large memory systems, the flusher may not be able to write back quickly >> enough. Consequently, MGLRU will encounter many folios that are already >> under writeback. Since we cannot reclaim these dirty folios, the system >> may run out of memory and trigger the OOM killer. >> >> Hence, for cgroup v1, let's throttle reclaim after waking up the flusher, >> which is similar to commit 81a70c21d917 ("mm/cgroup/reclaim: fix dirty >> pages throttling on cgroup v1"), to avoid unnecessary OOM. >> >> The following test program can easily reproduce the OOM issue. With this patch >> applied, the test passes successfully. >> >> $mkdir /sys/fs/cgroup/memory/test >> $echo 256M > /sys/fs/cgroup/memory/test/memory.limit_in_bytes >> $echo $$ > /sys/fs/cgroup/memory/test/cgroup.procs >> $dd if=/dev/zero of=/mnt/data.bin bs=1M count=800 >> >> Fixes: ac35a4902374 ("mm: multi-gen LRU: minimal implementation") > > 3+ years ago, I don't see a need to rush this into 7.0. Agree. > But should we cc:stable? I don't think it's necessary. The issue isn't that serious:)