From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-154.mta0.migadu.com [91.218.175.154]) (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 543B039890A for ; Fri, 21 Aug 2026 08:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787300288; cv=none; b=jMqkxd0uCMir+EhcU5P1LsjBBUjuxoLdDNhpRJhrDm972AtEP2ew2j7mNk4900yYeXnP2D6Sz+wzy3IXatqz+fE/QvaOWVfyjQuY1Zr7iQPOkxSZRE8WbPQDPLd0ncjv/5Xg/QFmzgn70DyZx4dBCI5q8LKQlkDegXVSGTv/EmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787300288; c=relaxed/simple; bh=q2LBYSGl4npt3b/U4TgoApNxg/auAjLyjB3dvIGUVCE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fyN/FRgHKfMkjsDgF+VuhesA/L4miQL+ZRbkG0gOjzCBgNsksyXLycqEodrNsjEMqRHeUO136G7+mww3pcwof/d+hByiOj/6S1NUhsUwasNngRg1pfmTBYt6tCrbGwmZJwXDygTYkQRAlYRJYQb5rbgHA/W6rwoiK/FNQVhEhsw= 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=kyq3VeJX; arc=none smtp.client-ip=91.218.175.154 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="kyq3VeJX" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=q2LBYSGl4npt3b/U4TgoApNxg/auAjLyjB3dvIGUVCE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787300281; v=1; x=1787905081; b=kyq3VeJXQcnnlz5UHJ6NDw98y1YRwhlNRYbFXHEwvNjHJwsMYiv9AQTvnOsqtfBy9O4dgd4R H1UnSSI4LZ8kusgMemM5Y139IRV0oMfNSR5Ht5WbaqwgfaJZf/7RP0jIiqKM8jQIspcGCe7G70k 3BPOBYGngLsH+PX9uS1ZzNvs= X-Envelope-To: linux-kernel@vger.kernel.org Received: from mi-ThinkCentre-M760t.mioffice.cn (14.29.108.92) by smtp.migadu.com with ESMTPS id 89c40d2368cbfa1d; Fri, 21 Aug 2026 08:18:01 +0000 X-Mizu-Trace-ID: 89c40d2368cbfa1d X-Migadu-Flow: FLOW_OUT From: Ridong Chen 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 , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen , Ridong Chen Subject: [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type Date: Fri, 21 Aug 2026 16:17:37 +0800 Message-Id: <20260821081741.1340277-1-ridong.chen@linux.dev> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Ridong Chen min_unmapped_pages and min_slab_pages are documented as per-type limits, but node reclaim treats them as one combined gate: once either is exceeded, shrink_node() reclaims slab, file and anon together and pushes the other type below its limit. Per-node proactive reclaim reuses the same gate and fares worse -- with page cache and slab both under their limits it reclaims nothing and returns -EAGAIN on an anon-heavy node [1]. This series gates each type separately via two scan_control flags (skip_slab_reclaim, skip_file_reclaim) set only on the node reclaim path, drops the combined gate, and extends node_reclaim()'s early bail to check anon. The flags default to zero, so kswapd, direct, memcg and drop_caches are unaffected. Tested on QEMU (x86_64, 2 NUMA nodes), A/B kernels differing only in this series. Proactive reclaim (echo to node/reclaim) on an anon-heavy node, file and slab under their limits: metric before after ----------------- ------ ----------- pages reclaimed 0 MiB 254 MiB anon return value -EAGAIN 0 Node reclaim (zone_reclaim_mode) with one type under its limit -- the type under its limit must be left alone: type under limit before after ----------------- ------------- -------- slab 645 scans 0 scans page cache 83 MiB scanned 0 MiB [1] https://sashiko.dev/#/patchset/20260723045718.2052070-1-ridong.chen@linux.dev Ridong Chen (4): mm/vmscan: only reclaim slab in node reclaim when over min_slab_pages mm/vmscan: only reclaim file pages in node reclaim when over min_unmapped_pages mm/vmscan: drop the combined limit gate in __node_reclaim() mm/vmscan: do not skip node reclaim when only anon is reclaimable mm/vmscan.c | 89 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 22 deletions(-) -- 2.34.1