From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1B074028E9 for ; Mon, 29 Jun 2026 12:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782737014; cv=none; b=D5doCUjFqXoTUiCkrWAHwuZW7IvEnhFbAxCOJPN+vqPzkKxcb16V07aI5r+BVFlluRXrC8zBdBat/UtPaZ1cbubCLHxIQCUCcj81tbQGEn4oeYLiV9sImJCYuY7qgSazKo0W2TB4MWW2b9RslMueKTDwStZoRZTAVy6fiodFZ60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782737014; c=relaxed/simple; bh=O/gIbts1f7CL2XN52/bV5lTNLsKRUQkMfH5KfMIv2j4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fmAqr+W7I97iV0sXGp4Yl4o2jZsiiX/9WY9v+ZRTczYowFDuS301b07FqA391Ms1G2UEcNFMrWZmr6o7H0n8gdhmc0hkOQFk7AB1bKopEtVRKKjCNxiqzDdrH9fUZSgFmEJqyhWHLK1vW2s0wDDGrfpizgQqrAO+TYhDJg5HqzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=SxCOBggx; arc=none smtp.client-ip=209.85.160.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="SxCOBggx" Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-51a868b6962so41619361cf.2 for ; Mon, 29 Jun 2026 05:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1782737011; x=1783341811; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=x7QqOx7L0yRT5lYn1aBp2HBANrTGQYy6nWxkVXuVCPs=; b=SxCOBggx4V1SujIjvt5JLQWIKcDetCWXUGVRlhY1pd5OLEtqo3r7pm+jN0eZn9jI72 8iXDSCk4gXXr01TAnrC1hQhmAVHVePAO5trr8LIvtqk68hXUWIddabpptMGAHbfYgjdy 1mhuz8YKsQ3xxpYiGBQ7josDgE74Y1m9saXQG38Yea/5yNePhaWctqFKuniLnX7Ct0D6 D2TiGsMKY0JeRBVG/FciStVBmMQ31osZegyu12KIdh0AqsDoksAV40FaZWq5kMaerLTx mQOYI67vw44zDJEHdj+/obS1mQZRJipffjD6+PoQd5jk6jKIrzsrWSnBJO0zpbZeOfcL Uljw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782737011; x=1783341811; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7QqOx7L0yRT5lYn1aBp2HBANrTGQYy6nWxkVXuVCPs=; b=Mi8w/PU6ReE+owazDpM3RMSWMjBGeGKoYwS1xhV4SJKGTYBJFolJWzXoCP9HzvsdxM b4uFPa6ahNKOwGufsDVXriyhA3ywF2zPfxNKUyT26Isg8XnLnZUOFCIA2BArBygTdLrS 5JYW4mASNRrJrh7e+jRd6GPec9zLIjmKOwwY0ILE0JEThXbwR4IL8D7270qFFiByC3QL EK52t7FwtlCdpTYhWq5U3A2O+BVVdV4/S1hzTouY8mBKdmfSnVegxRDCb+BibJ2OGQdM VaAvZV1EVihIo70SBMBddfO5Nnm5uLS2XN7wI/xip+BlmJQEYakNOYIXTziUxtftP/rU JZpw== X-Forwarded-Encrypted: i=1; AFNElJ/rij1ju2+HsgGp8PyN2xboHtWGqZfOc/syfKKQ8BrEoqJ4/o1vk2LOSDGc8nDRtHmwB14jLUEy0NIyXT4=@vger.kernel.org X-Gm-Message-State: AOJu0YxXjYxHVIGa8ItPBP/oYpKnEcAFjZHA6aRcTOc1oPWU4AxnjCEA cxugZZPfHC7xdjwFshrrCe1aqfS+F1Rmm1kPfaZ1rceAxJ4bfRXE16Piny+eRSJL2ow= X-Gm-Gg: AfdE7ckNPsreNNZBY1Vz907HH6zzExj7fO0Vcu/wmhKXxYmLDS0xxANEha2iEroSFbG GhxlAcLsbWRTEtRrOQBybi1SHwrzhtr3R7OfjvRynSqxnzZJoWgPQISgoMSf63mSclL+PjasaWr JvYG6+Al0OX07fephrKxRjkzA+qGoQWAbRlbaSYM1V3O601fM5IkcslMYOywNeM/a3DRoLDr21z vctYcpuynvbNIVC4FrMXKhxV49ATZzALUEEM73Vg+WIkAfsZUgwRpcPGtlNCI3ki/utqoY8AA3Q w9Gxx6Pw24K/Nem0Ahy52qFLU+x22Wg0BAo0mYnn3sSLEXQtOblcWGn5YxCTAF0kIi+dL5RHmzs i+An3fjcB6J9M9KfB0buyGxLPIBV/q4t53/MR4vSRDftTPkqHqDNyXLbJgz0cyM+W+mlFQkGsUn T5oTCalWy/WHw= X-Received: by 2002:a05:622a:48d:b0:517:6665:2a9a with SMTP id d75a77b69052e-51a727ee736mr224276821cf.50.1782737010340; Mon, 29 Jun 2026 05:43:30 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8df7ef1fe40sm304784856d6.4.2026.06.29.05.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 05:43:29 -0700 (PDT) Date: Mon, 29 Jun 2026 08:43:28 -0400 From: Johannes Weiner To: Baolin Wang Cc: akpm@linux-foundation.org, kasong@tencent.com, qi.zheng@linux.dev, shakeel.butt@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: 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 Good catch and nice cleanup :) Acked-by: Johannes Weiner