From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 9436A3793CA for ; Mon, 29 Jun 2026 15:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782747839; cv=none; b=ej/DQvuIFLfvbF7UY5dallxLex+W//CZx1neCJDoGcNWVx72loY+/xB+jLLmy47KkdVhF/1zfDwsg03qm/zNxwx3XNpb2Fn2ECYTP4dSHcNnYtTJB2q9tuqaj1BeTFE63P3j8TXWlGFMkm5MAK8nDRi/hPCHitvT+5O6UXtx6CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782747839; c=relaxed/simple; bh=+rscg2czbADR3cuToB9KEmXPwh+/w4qtyndd467cRcY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h4Pb0Xsza0Y4LzKGEClDV+IBc1cnSri5CI2RvWXC7r6dWRF6b65F1s+qeObsq0wnI05reWaYC6qxy+F/Y4mI6fseFWLayTAoiDk8h05wPwGyXRITDx5LqCDOg9YDW44zksIcgylTyzgFB1iFunGQBdudpReH4pYCBhkEnqLoJeM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=rdPYxR5K; arc=none smtp.client-ip=95.215.58.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rdPYxR5K" Date: Mon, 29 Jun 2026 08:43:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782747835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9kqyBkissqm61SxYgWJgAGVBgaWZdVQaWG9FdCDYB1o=; b=rdPYxR5KAi6jd6uLloXxh2yrSkwe2NgJH0C7Jt/8qiMYcDJt/kiZ3TOku4hY8tVQNSwwg4 Ir3K0lphfJfpAbkJNRTg/RTZLupVneuPwDbfLXBTqiKHtlTkefiQYu2f2aifW5rSL8Qlgq fM6VgMPEFOpelTaFrNkOk6x6//zqapU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Baolin Wang Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, kasong@tencent.com, qi.zheng@linux.dev, baohua@kernel.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, david@kernel.org, mhocko@kernel.org, ljs@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: vmscan: remove the redundant FOLIOREF_RECLAIM_CLEAN logic Message-ID: References: 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: X-Migadu-Flow: FLOW_OUT On Mon, Jun 29, 2026 at 04:04:06PM +0800, Baolin Wang wrote: > folio_check_references() will return FOLIOREF_RECLAIM_CLEAN for referenced > file folios, indicating that we can proceed to reclaim clean file folios > or keep them if they are dirty file folios. However, after commit 6b0dfabb3555 > ("fs: Remove aops->writepage"), we no longer attempt to write back filesystem > folios through reclaim. Instead, we always activate dirty file folios and wakeup > the flush workers to write them back. As a result, the FOLIOREF_RECLAIM_CLEAN > logic is now redundant: for dirty file folios, we will no longer reach the > 'references == FOLIOREF_RECLAIM_CLEAN' branch in shrink_folio_list(). > > Additionally, lazyfree folios are also placed on the file LRU list, but if a > lazyfree folio becomes dirty, try_to_unmap() will fail and thus prevent reclaim > of the re-dirtied lazyfree folios. > > Therefore, we can drop the FOLIOREF_RECLAIM_CLEAN-related logic. > > Signed-off-by: Baolin Wang Reviewed-by: Shakeel Butt