From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-168.mta0.migadu.com [91.218.175.168]) (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 0C3792147E6 for ; Mon, 24 Aug 2026 03:24:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787541896; cv=none; b=pwQkx7nnirrzTBWLXhwcsNZuAgAzinSyCT2O+QZVkhg4/Xm8fGCRVqu6Z8O5emJHWq7MQc5P3t2ImaVwTFPnrXamycHncyu7D3l6T+75mI8iyR/au07IOhJkwW/Ac0BVz5sI4BkspTG5b/GJoPILGUYYxB9Q3KkrGCK1hFY3Klc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787541896; c=relaxed/simple; bh=GJQQjYv5cAikeWZ4aygGwi6YdDnAejQoQYl0vwFIJJY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g850Iq7i6J4nIUGJ2sburEFQ63akzxsZuHG+SrplDteWK9VV5tIpf38od81VlpmW5hGgC/18ZFRBlfbwlGkny0tVdLIjpZmASyZaGIJf/QjIVeqwZFSRVGcm32xGQII3IuWZzfAtrLk8rUQEufSHBXJlVZ4MS4UTBj4il3EYHrM= 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=qKA7mjhX; arc=none smtp.client-ip=91.218.175.168 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="qKA7mjhX" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=GJQQjYv5cAikeWZ4aygGwi6YdDnAejQoQYl0vwFIJJY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787541891; v=1; x=1788146691; b=qKA7mjhX8EqNoG6I6h7I+tcfMxDLqWdEdnODkaQ/xeobZYgC3tpKQ4nL0ZTpJILXqqcvyCOT g6rhSUYBRI8eNOu28tZ+qRNefDIdRrWintA5F2bzVu8MrIMIyeLnOj4ZnILXPEy1S7ubNMUEGBO tNqeR5TZfWdtJc9bLRCCdw4Y= X-Envelope-To: linux-kernel@vger.kernel.org Received: from [10.63.107.123] (14.29.108.92) by smtp.migadu.com with ESMTPS id aeb7d2d31c83cd6f; Mon, 24 Aug 2026 03:24:51 +0000 X-Mizu-Trace-ID: aeb7d2d31c83cd6f X-Migadu-Flow: FLOW_OUT Message-ID: Date: Mon, 24 Aug 2026 11:24:46 +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: [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , David Hildenbrand , 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 References: <20260821081741.1340277-1-ridong.chen@linux.dev> From: Ridong Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/21/2026 7:20 PM, Michal Hocko wrote: > On Fri 21-08-26 19:10:45, Ridong Chen wrote: >>>> Did you mean that min_slab_pages and min_unmapped_pages should influence >>>> proactive per-node reclaim? >>> I apologize for being incoherent in my last email, it was after a full day of work. What I wanted to say is that min_slab_pages and min_unmapped_pages should *not* influence proactive per-node reclaim. >>> Nope, exactly opposite >>> >> >> I would really appreciate it if you could clarify this further. Sorry, I'm >> not sure I fully understand what you meant. > > pro-active (userspace triggered) node reclaim should completely ignore > all those historical node_reclaim tunables. Yeah, this matches my understanding. Apologies again for the confusing reply. Since Johannes has acked patch 3, perhaps we can simply remove the conditional check in __node_reclaim and keep the shrink loop as follows: ``` @@ -7906,16 +7906,16 @@ static unsigned long __node_reclaim(struct pglist_data *pgdat, noreclaim_flag = memalloc_noreclaim_save(); set_task_reclaim_state(p, &sc->reclaim_state); - if (node_pagecache_reclaimable(pgdat) > pgdat->min_unmapped_pages || - node_page_state_pages(pgdat, NR_SLAB_RECLAIMABLE_B) > pgdat->min_slab_pages) { - /* - * Free memory by calling shrink node with increasing - * priorities until we have enough memory freed. - */ - do { - shrink_node(pgdat, sc); - } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0); - } + /* + * Free memory by calling shrink node with increasing + * priorities until we have enough memory freed. + * + * What to reclaim is gated per type by sc->skip_slab_reclaim and + * sc->skip_file_reclaim. + */ + do { + shrink_node(pgdat, sc); + } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0); set_task_reclaim_state(p, NULL); memalloc_noreclaim_restore(noreclaim_flag); ``` -- Best regards Ridong