From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 6838839A7FD for ; Thu, 23 Jul 2026 04:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782670; cv=none; b=fe018ZeyO0qXYQWV+r2cKYwU+Sg0sp2FtGPLn+2Pr1octjzIpZYCCcOi7sPUUmr2au4ArbBCzQsedQA2nd0+ZACUtfMwGboPrFFm2fXZHsEB9x4VKqduRQlPXjcEFNT0/03SbR7zptxDgbvAdmGej5ZZ6lqmbs0TmdPxSRVFKII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782670; c=relaxed/simple; bh=I+wbGBQvYufZr2b0o9CB1aFcVr6cmt5NVqhqKDyE1Is=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=OgTiIfnQZml9kAI7yDbnlaStvz20yR0/WLF2ROq+KXrZml/vvKuOhKjbXDpH+ZCq56nKA//sc8hw+vX7/kx0isv3qXhq/gEUzzqUnMoAe6Vxz1t4MOyg79bYvuh3U66/q3szb8koy0rhCK0tahhsPHKhzV/bZ3QayQ/jgY9oVks= 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=cB/EqYXQ; arc=none smtp.client-ip=91.218.175.188 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="cB/EqYXQ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784782660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=D9PXK/VnSXu9mRT9lWl5kfcdPoYQW0WERqPj1082VQo=; b=cB/EqYXQJO3MdMYA92smLpSiJGKIBTCciBIZHrnkrEmRbtbVMzslvXCBcHawyVA5c4Z67K TIXaaFnfmrdygiHp/mJiGgyZSMWRJmDEMJRU0kZuEKiNlJr4KANEbWYIKu+XS6SuPQ5Lgz D6HsvqW9syMp88D+ooqgIVvnrpCrCO4= From: Ridong To: Andrew Morton , Johannes Weiner Cc: David Hildenbrand , Michal Hocko , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Kairui Song , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Zhongkun He , Muchun Song , Davidlohr Bueso , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen , Ridong Chen Subject: [PATCH v3 0/4] mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim Date: Thu, 23 Jul 2026 12:57:14 +0800 Message-Id: <20260723045718.2052070-1-ridong.chen@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Ridong Chen Fixes and one cleanup. Patch 1 fixes "swappiness=max": the anon-only test in get_scan_count() sat after the "cannot reclaim anon" check, so when no anon was reclaimable the request fell back to SCAN_FILE and evicted page cache instead. Patch 2 fixes reclaim_store() collapsing every error into -EAGAIN, so callers can no longer tell an invalid argument from a busy interface; propagate the real error code, matching the memcg path. Patch 3 drops the now-unused gfp_mask parameter from __node_reclaim(). Patch 4 fixes the same "swappiness=max" issue for MGLRU. --- v2 -> v3: - Update comments and commit message. v1 -> v2: - Collected review tags for patches 1-3 - Added patch 4 to fix the same issue in the MGLRU path. Ridong Chen (4): mm/vmscan: fix anon-only reclaim evicting file pages when swappiness=max mm: vmscan: propagate real error code from per-node proactive reclaim mm: vmscan: drop unused gfp_mask parameter from __node_reclaim() mm/mglru: fix anon-only reclaim evicting file pages when swappiness=max mm/vmscan.c | 54 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 14 deletions(-) -- 2.34.1