From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 1709E1E520A for ; Tue, 6 Jan 2026 14:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709454; cv=none; b=iLb7Gsh91qkgqOWpJm0fH+x+0RnUQmGcitBDBP4NOdQTf3Bc3uAJDBZEZ4ZrstKp6lLMj2sxHWO/j8JgjgVY9+J0WZ6twpg9G/2AmV1HhSGdpCt8og5gNeVqjwavkoxVazbvVOn/GT6PmT9eeEtJq5VexWZGq4GwqBQMHnvIJUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709454; c=relaxed/simple; bh=nNdVsV52KdhqeNC8yMCpQklGTglYaP6EfhxMiSNTDdw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bpZb4/irS659TI5uctS2uxk+cReI+kyENMSSXxlGprlWwhQnYtIUqU/4RgzUsIxPWhubaIf6+JoRwBr52cU5PrRR1a5gX+LPfZqpg3j0rbWTBMF0waFxlKFci/U72ZtXNMFle7tnxghSSxil64fK79i+q2gDYPYVYeZE404wSuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=eS+yV8wE; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="eS+yV8wE" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-8c2f74ffd81so93624785a.1 for ; Tue, 06 Jan 2026 06:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1767709451; x=1768314251; 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=gKFtmrwYJffjJ5vAfa993qtRrR2MOeXl2weKUw1hfgg=; b=eS+yV8wEHN/g/QxuijgGEe/W0Z6wgFpCwu4b8oeJoM8i4HcXsulQEJm3gsmn0asqn5 aaoY/tRtFDUITVQtOHKCPbTtqcCWhE2TGxwXnknaENOuiITnC+6mbKLWOwVY2au4Glfe L2GzpqT9E5pg4yihKw2SKJAyvMMfl8nV66g8O1a/X3NlhUMjpYr90W3ph8jtWSYO1PG/ WWpFeHrs7UdLkuczPiKinaJWS7HP67EW2AJU0D1l0CcorJ+kZYVgMV64crT8UBcunN1n M2USWBDr4IEpf54Miy1qslLj2Z17K8gKukptcPlru54/gQZe4gF3oAHo0y58ZlDty/F7 b12w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767709451; x=1768314251; 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=gKFtmrwYJffjJ5vAfa993qtRrR2MOeXl2weKUw1hfgg=; b=XF4o5YUGUIgBOsCcZv+KOyysxChpQQKynw3+nBE2ZwSYycLMnxiaK5lkmCLL5Z3MAW cI3s1NnczsWNJqOPxEiddtfN2zFB6cFpdBwjSHJ/I2gglNIh18w2lMbG1SPGmvg5aVeE 5vFVOYS506EZsez0IpeVA3lmiDCL/uOTxPPGlrXbH+KlQQ6F5hilEyXrxFsJI2BB/FRS CcMxbTy6J/0jxfQVmvgFvTt4wxF2wtHsfwp8Wri4CWMLqVhRlSOom8ZBAnyyd8t1vEs2 S/dpzufqK7VrhPxDjEbLmr8MWdxc2tIVESboJUG8+rI47l/wGS3oKAQepy0WnOVh/mCL ArnA== X-Forwarded-Encrypted: i=1; AJvYcCVuhccTgnqi56Wd1k/jkHt1jUxbQu32z4yguz/7XJl4At8cUn40gIj4XOcbUMy8OjG8iSMhLWufnOVyEMI=@vger.kernel.org X-Gm-Message-State: AOJu0YyprZUZXWjUXpB+LU8SxXhCh5lFwhxnjXKQP/HGkSNR9KYvx2kn t31NJkmXlM8XNHoSP2pnEGRNXmHtLBStGnNPGK5qLNYmNjQewa0NTZCtZtJ5pDYKwjU= X-Gm-Gg: AY/fxX6RWw4vPIL/3Z4JvZby9FjSly3LJuiORx0MeI1fna5xDlWGeAJOybkCIg8GDnc rukxgofahYlp4tAJBQkLBtvYxWrVSY9nLpvmqhLeOPEKPM1F6JrIXPs69w3TBzeipI2etysN8O1 Qth+lt/jIIwtcsgfsBF/QIrx+GGaJZlAn+xDrQsNEmvSlIa1FpYO8OCh/m6iLtStN+AS1M/nkQg AK52jGPIL64nX0Sdbn8a5GNpesLjO4RM86TbtPBCDOAXVa3LVVJCQDYchoZtTMlDzbbeWxoK9Se hOmfcOe5pXVhTCqpXHn+DzYypw9jrLVG3uquS9Ujqol1SLG8VQ6hEYgdao33Y8HUPiWcCZSZTl1 2YLW9Jb1JljJhnjr3ZnXy6JyGilM+xf3/VG/rsUNcLZNcXfmbzn9FGU2nfCAmSWGrEti1hHcZC1 P41LwUkcLjQRZtdY/Lb3HRg6KzoZPdJ+qSeQkw3gYbJ+86mzopdb7PddbTVt54mXhS9bFF6Q== X-Google-Smtp-Source: AGHT+IGMO4IFrkX9A1M1kgyKKyomZ/Tm009TfQhyVAXfXHBjJcxasAIany0LY092XpBTY+2rtwysZA== X-Received: by 2002:a05:620a:4808:b0:8b2:e3d1:f7e0 with SMTP id af79cd13be357-8c37ead0b5cmr435049585a.0.1767709449546; Tue, 06 Jan 2026 06:24:09 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c37f4b917dsm178740585a.17.2026.01.06.06.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 06:24:09 -0800 (PST) Date: Tue, 6 Jan 2026 09:23:34 -0500 From: Gregory Price To: Bing Jiao Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, longman@redhat.com, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, tj@kernel.org, mkoutny@suse.com, david@kernel.org, zhengqi.arch@bytedance.com, lorenzo.stoakes@oracle.com, axelrasmussen@google.com, chenridong@huaweicloud.com, yuanchu@google.com, weixugc@google.com, cgroups@vger.kernel.org Subject: Re: [PATCH v6] mm/vmscan: fix demotion targets checks in reclaim/demotion Message-ID: References: <20260105050203.328095-1-bingjiao@google.com> <20260106075703.1420072-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: <20260106075703.1420072-1-bingjiao@google.com> On Tue, Jan 06, 2026 at 07:56:54AM +0000, Bing Jiao wrote: > > Bug 1 reproduction: > Assume a system with 4 nodes, where nodes 0-1 are top-tier and > nodes 2-3 are far-tier memory. All nodes have equal capacity. > > Test script: > echo 1 > /sys/kernel/mm/numa/demotion_enabled > mkdir /sys/fs/cgroup/test > echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control > echo "0-2" > /sys/fs/cgroup/test/cpuset.mems > echo $$ > /sys/fs/cgroup/test/cgroup.procs > swapoff -a > # Expectation: Should respect node 0-2 limit. > # Observation: Node 3 shows significant allocation (MemFree drops) > stress-ng --oomable --vm 1 --vm-bytes 150% --mbind 0,1 > > Bug 2 reproduction: > Assume a system with 6 nodes, where nodes 0-2 are top-tier, > node 3 is a far-tier node, and nodes 4-5 are the farthest-tier nodes. > All nodes have equal capacity. > > Test script: > echo 1 > /sys/kernel/mm/numa/demotion_enabled > mkdir /sys/fs/cgroup/test > echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control > echo "0-2,4-5" > /sys/fs/cgroup/test/cpuset.mems > echo $$ > /sys/fs/cgroup/test/cgroup.procs > swapoff -a > # Expectation: Pages are demoted to Nodes 4-5 > # Observation: No pages are demoted before oom. > stress-ng --oomable --vm 1 --vm-bytes 150% --mbind 0,1,2 > > Fixes: 7d709f49babc ("vmscan,cgroup: apply mems_effective to reclaim") > Cc: > Signed-off-by: Bing Jiao This looks ok now, haven't tested it myself yet, but looks good. Thank you for the fix. Reviewed-by: Gregory Price ~Gregory