From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f193.google.com (mail-dy1-f193.google.com [74.125.82.193]) (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 024D32D7DE1 for ; Mon, 16 Feb 2026 17:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771264233; cv=none; b=TL8TgVYgN4Z9KmDtJxrVy6eMozCKPrcDDoR4dpctz0nh5rZ6UEcccEgHcd/lHRar8aWMkd4XESOcdqtIZu04I3+C1Jv8G1h7jL6MI4vKZBL/p8mRXnFKl7oXgz39wMWHFSlSdhvkF3udRjfufKeiXMTV9URk3AJ78q6hNVAJXo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771264233; c=relaxed/simple; bh=Ec4ypCO7FiJJB+yavcc9YDym7HBY5xKLTV2mp01Hofw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KiY7l2pqVCJn52Jxyk6IFwR+hRfWOZ9kh2MJaEPlpkBaNJCIrlADd9rgN/58Or2iXKJQQ+lL3sI/0WD8slBtr+WgQ57E6M0b4pj8L5/lkllklE+lNmZiLOIwp1xjC4f471TTNRDmjasy5/60Eo3YjNzFsooNOT4FbZJRxfRas0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ft9H30wb; arc=none smtp.client-ip=74.125.82.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ft9H30wb" Received: by mail-dy1-f193.google.com with SMTP id 5a478bee46e88-2bd3b0bc201so772893eec.1 for ; Mon, 16 Feb 2026 09:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771264231; x=1771869031; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zv95Lg9oAGKyC92FTr/4yJbiWOBA02orWovY9nKn8Ws=; b=ft9H30wbkzAnQF+R4OSZxzM2CdqelCDfXp2GDbirmmg1h8jPPKF1zj5zn7Ul2l+xDR rqli/WP3bGHpggZ4ke2kDg6FxsO/HClYfV0Th0CsoOHhPxuh+9uvcpB0u2BjO9Kedaeq BvTsa/mOQlYwqvOOjWE9X2EHBYbaPQAP9XKq+/TtFUlyMJuIofnMq/OezPDCcf6f8IiL xnPZz4xlQ46eYF8fAxMTL8rDEC/IVuWQeMvsec+p9aa5mAxNgehgDNEkubc6JwPbwhWv KNMzm4aU2hDEQd5rNb6D4pSu26moMBQkm5r2n814gzmYs/zah9xsa3vI773O7tQKIyA7 mb8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771264231; x=1771869031; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zv95Lg9oAGKyC92FTr/4yJbiWOBA02orWovY9nKn8Ws=; b=XLXOO+VoTK1RliW0bvdSVLAQIC/nMb8uiK0suMyOHGanBdUr77f4AMAHwkeGbPwScv NNsKLUQGwb3iV+OL3WZinKLCkWa+riWgPy9HN/f6b0B5LIXcEX0GnaHsAhtbuvbn/Xdm z+fTAD/aZ37DzeUCZxfl9H3u8GiEWOeIHJh4qqza1UK2X9Ibmrx36ZqxnbzskQIq7N6n yz/W1avT/bMYs1FxSRTtOrNfFgyHSkio9bxOYIFuYpD1W2uUobW2XkOVs0SlClrihvYn MnEwhyCLdaaD6n4o4qyLU249qJ+VRy14ramo8kWHDITOxfTSH2O0CwPuE0J7jCBJuWgy KbJA== X-Forwarded-Encrypted: i=1; AJvYcCVCuFfBc5AlgQ8XksBREB3JJ7YO/7Pg7XGJeqvdOu6NbqZeytEmFVJaZH279ByYloEa5qpbndrf+RXzeOw=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5OL8ADbWDW1T84tCY8PSBxzJWWehSLpORlISppulQPTCgigxu BpCbxMplaun34rD6sZ0VYpZ9TNyE1zBzTkIbu9gPXKpNm6yAJ+WadlGu X-Gm-Gg: AZuq6aIEWBCDNxOcqTLnh9V5eXaij5Jk7H65bCf4dMgkeWQBGTHl8w5GQTpmh1vPmU6 nPb3kADnI/AsdJ4OMLu2wWai8jdsxuqQdRPZhy3A4wkC0pze1knVGFknJ0kDOV+4yTwdF2BC4le TLPoTeZZ55QpgvCA4D/5EnhLgPTO+E2Gw8OSgSN3q7pYCoFLXakEGkm5DOtjkT+u5kQtJ/mVSaN pYCRxj28fYNk2WLOWFo0Xze+Td6JcV+DgLcGEVmI/KwJ8PsesN7ow0KsRJTpAVBiVyx19UYUz8K JBKSNlUjOd3Z3i3puqYiAW98mnGvcCc80Jhb4apb38DSiKVYgwzbjHj8eShPnvA69gC706F9CYI jejLoPlOkELRhZ9lQbkVdR/zpIdpLYZOXy9LgWKMdDzYGM53IZ1kcRxQLooEeK0VxrjLuj5aYNw VRAnXmen/mbR/n0Xap+ZomH1h6WgyxjlyP1l1+f40jt4Q= X-Received: by 2002:a05:7300:23d3:b0:2ba:7606:ace0 with SMTP id 5a478bee46e88-2babc5356bdmr5353650eec.25.1771264230825; Mon, 16 Feb 2026 09:50:30 -0800 (PST) Received: from [192.168.4.196] ([73.222.117.172]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2bacb66c24esm10455308eec.27.2026.02.16.09.50.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Feb 2026 09:50:30 -0800 (PST) Message-ID: <3fe7c5dd-b184-4421-a21c-bafce6aa7b09@gmail.com> Date: Mon, 16 Feb 2026 09:50:26 -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: [PATCH 1/2] mm/mempolicy: track page allocations per mempolicy To: Michal Hocko Cc: linux-mm@kvack.org, apopple@nvidia.com, akpm@linux-foundation.org, axelrasmussen@google.com, byungchul@sk.com, cgroups@vger.kernel.org, david@kernel.org, eperezma@redhat.com, gourry@gourry.net, jasowang@redhat.com, hannes@cmpxchg.org, joshua.hahnjy@gmail.com, Liam.Howlett@oracle.com, linux-kernel@vger.kernel.org, lorenzo.stoakes@oracle.com, matthew.brost@intel.com, mst@redhat.com, rppt@kernel.org, muchun.song@linux.dev, zhengqi.arch@bytedance.com, rakie.kim@sk.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, surenb@google.com, virtualization@lists.linux.dev, vbabka@suse.cz, weixugc@google.com, xuanzhuo@linux.alibaba.com, ying.huang@linux.alibaba.com, yuanchu@google.com, ziy@nvidia.com, kernel-team@meta.com References: <20260212045109.255391-1-inwardvessel@gmail.com> <20260212045109.255391-2-inwardvessel@gmail.com> Content-Language: en-US From: "JP Kobryn (Meta)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/16/26 12:26 AM, Michal Hocko wrote: > On Thu 12-02-26 13:22:56, JP Kobryn wrote: >> On 2/11/26 11:29 PM, Michal Hocko wrote: >>> On Wed 11-02-26 20:51:08, JP Kobryn wrote: >>>> It would be useful to see a breakdown of allocations to understand which >>>> NUMA policies are driving them. For example, when investigating memory >>>> pressure, having policy-specific counts could show that allocations were >>>> bound to the affected node (via MPOL_BIND). >>>> >>>> Add per-policy page allocation counters as new node stat items. These >>>> counters can provide correlation between a mempolicy and pressure on a >>>> given node. >>> >>> Could you be more specific how exactly do you plan to use those >>> counters? >> >> Yes. Patch 2 allows us to find which nodes are undergoing reclaim. Once >> we identify the affected node(s), the new mpol counters (this patch) >> allow us correlate the pressure to the mempolicy driving it. > > I would appreciate somehow more specificity. You are adding counters > that are not really easy to drop once they are in. Sure we have > precedence of dropping some counters in the past so this is not as hard > as usual userspace APIs but still... > > How exactly do you tolerate mempolicy allocations to specific nodes? > While MPOL_MBIND is quite straightforward others are less so. The design does account for this regardless of the policy. In the call to __mod_node_page_state(), I'm using page_pgdat(page) so the stat is attributed to the node where the page actually landed.