From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 EDFE2313520 for ; Fri, 30 Jan 2026 23:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769816147; cv=none; b=iw4IkbcVsJsU8DXQokhOTL67Y2kxIbFJutHgFSpnVP2JnefzGr6gFIgL8cFH7AuR/cChU+lIzJ/YFgSaop9Lk2lQUjTxPMltOZLj1JdV3Zq50lVDaJ+RlpTlNKJcvFfE5vAw/WwVb6+gHxyuAYcRJbHbCmQEv0XNGXpVoNZFEAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769816147; c=relaxed/simple; bh=0XsmNB/cJEEJOV5ekDEBb6y6xwpl6vjPQ8VpLUrCSbw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YCFlkpBhVFi/3MEl+bkgVgZds8BWoE9CYjlyNC+CN5NqFGD01cSKy781KNvkme7ewvmmQzooJ/8AhJ3Car3e6kfl4yM2zVZ/rczuL/IGK7BA168Go+Bw6IYAXCPLQUcnaUO2O2qT7d8zE7g18b3OvL2DrP7A6rlOMj5v7Nms9dE= 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=X1Dza28U; arc=none smtp.client-ip=91.218.175.170 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="X1Dza28U" Date: Fri, 30 Jan 2026 15:35:26 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1769816133; 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=gn7Q0rUz55te6YHyK/yjpPJr74GIFvZD19IJz+ORIro=; b=X1Dza28UzfqXP3kwVJyhdYf7rx3FSQwEP5EJ+43zoCMDzSJ1HCpq+x7n5srwyelv8lfCto ntgFhpg7JnzNF1DVpw0iGJdTat+m796ZdymJ8gjZE87xPHnv9d//tiyBdqYpRoARez2MHt l0EhKVp6CM1XGbRezlroUnePeH13fM8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Bing Jiao Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , Qi Zheng , Gregory Price , Joshua Hahn , muchun.song@linux.dev, roman.gushchin@linux.dev, tj@kernel.org, longman@redhat.com, chenridong@huaweicloud.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v9 0/2] mm/vmscan: fix demotion targets checks in reclaim/demotion Message-ID: References: <20260114070053.2446770-1-bingjiao@google.com> <20260114205305.2869796-1-bingjiao@google.com> 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: <20260114205305.2869796-1-bingjiao@google.com> X-Migadu-Flow: FLOW_OUT Hi Bing, Please don't reply (i.e. use In-Reply-To) to older revision of your series. Send each revision independently. On Wed, Jan 14, 2026 at 08:53:01PM +0000, Bing Jiao wrote: > This patch series addresses two issues in demote_folio_list(), > can_demote(), and next_demotion_node() in reclaim/demotion. > > 1. demote_folio_list() and can_demote() do not correctly check demotion > target against cpuset.mems_effective, which will cause (a) pages are > demoted pages to be demoted > to not-allowed nodes and (b) pages are failed to demote page fail to demote > even > if the system still have allowed demotion nodes. > > Patch 1 fixes this bug by update updating > cpuset_node_allowed() and > mem_cgroup_node_allowed() to return effective_mems, allowing directly > logic-and operation against demotion targets. > > 2. next_demotion_node() returns a preferred demotion target, but it does does or does not? > check the node against allowed nodes. > > Patch 2 ensures that next_demotion_node() filters against the allowed > node mask and selects the closest demotion target to the source node. >