From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 0B606344DAE for ; Wed, 18 Feb 2026 18:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437763; cv=none; b=hoMAG5PAKuKA4ku28Mu0Uj/y6LKoeEi8k594/BQDb+KsoZUjhO/CvLHl2M1qEqRj/4iEHDgvlqyVef9lR9i33LzFdN8b7jZNbKl3OGaBs6Kx07QH7qoCCSDcz7wCJU0JBR8SsFQyc2BWf8LILZsrfhABzznO7g91o2oNZtgk5lg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437763; c=relaxed/simple; bh=MpPgHuBmwTC47RFlVTXxlEK3TC+OVeEmSrRINnoCdIE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WZuXz0QDp46oWNpHboc1htU7EiUbO3reiM9YrGSR+MVl8gYo9bXQZpL7HyThd9SFelccsINc/pStxXTQUbYYw9E8jiqwhiZj6eqKplvLAD/phS7BW6XYQv4WkHJP90w0dDrfKfsFp6akAO2k3DnZORNRTw88shZKequVk30Gm1w= 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=pIrisjkg; arc=none smtp.client-ip=95.215.58.174 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="pIrisjkg" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771437748; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cx1YFMXeXn8Jw1SsA/vK5p52GVwbuIAqyFb1QuBwKqE=; b=pIrisjkgRvEhyzm7mm89uxk+UXLZ3lxBEZan3dCK+yy0F568+BiAbZu8NBsKky8pzCkCCT uUW9PM9BMQvrw7vEkEVZlCqeTiQ4DXVLb5kwHS4v2KGbO/FRZ97l15af7lOF568zsJcNJd ZDigBiY/QGr91OsSfQbgpnzWCW/+E/c= Date: Wed, 18 Feb 2026 10:02:15 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] mm: move pgscan and pgsteal to node stats To: "Vlastimil Babka (SUSE)" , linux-mm@kvack.org, mst@redhat.com, mhocko@suse.com, vbabka@suse.cz Cc: 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, 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, weixugc@google.com, xuanzhuo@linux.alibaba.com, ying.huang@linux.alibaba.com, yuanchu@google.com, ziy@nvidia.com, kernel-team@meta.com References: <20260218032941.225439-1-jp.kobryn@linux.dev> <10434f89-fe2a-4cfc-9b29-1cd2ed2bbb7e@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "JP Kobryn (Meta)" In-Reply-To: <10434f89-fe2a-4cfc-9b29-1cd2ed2bbb7e@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2/18/26 12:54 AM, Vlastimil Babka (SUSE) wrote: > On 2/18/26 04:29, JP Kobryn (Meta) wrote: >> From: JP Kobryn >> >> There are situations where reclaim kicks in on a system with free memory. >> One possible cause is a NUMA imbalance scenario where one or more nodes are >> under pressure. It would help if we could easily identify such nodes. >> >> Move the pgscan and pgsteal counters from vm_event_item to node_stat_item >> to provide per-node reclaim visibility. With these counters as node stats, >> the values are now displayed in the per-node section of /proc/zoneinfo, >> which allows for quick identification of the affected nodes. >> >> /proc/vmstat continues to report the same counters, aggregated across all >> nodes. But the ordering of these items within the readout changes as they >> move from the vm events section to the node stats section. >> >> Memcg accounting of these counters is preserved. The relocated counters >> remain visible in memory.stat alongside the existing aggregate pgscan and >> pgsteal counters. >> >> However, this change affects how the global counters are accumulated. >> Previously, the global event count update was gated on !cgroup_reclaim(), >> excluding memcg-based reclaim from /proc/vmstat. Now that >> mod_lruvec_state() is being used to update the counters, the global >> counters will include all reclaim. This is consistent with how pgdemote >> counters are already tracked. > > Hm so that leaves PGREFILL (scanned in the active list) the odd one out, > right? Not being per-node and gated on !cgroup_reclaim() for global stats. > Should we change it too for full consistency? I'm fine with adding coverage for the active list side as well. For completeness, I could also include PGDEACTIVATE.