From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (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 414483176EB for ; Fri, 20 Feb 2026 19:02:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771614173; cv=none; b=hwxzk8fH1IVzLXFYe5SB4qapAo1Ce4XuVjFi3qxMbTbwVvFgxSYmjud4ZWKbV2ucfZsAbAO6b7qoH0tn5IGuOCYJhmrW2qUwn5bDDJVeBS8HH7NlwBJPIlu2UwC+RXpz993ck0x5YiC6VHKTswyR+TKnQzOIJZ0CVVzKiPoJeKk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771614173; c=relaxed/simple; bh=Cd+jqZjh3WAVSRNIVyZ6GsQswDgTs8XBJ+R9F/1aitQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZfA4pZcunj1OpJAIDXdxLN5MOAJ6+Uwed52qya3Ptm/z72gZlpNPfydqqildS1+mL7Dq/uX1lF72yFuW9iEqYOcOtJT2jqR4YtBfjoh8bTRvXZHgHQxILm2EFkAVlTT8rPDNfd5PfN+ZzuzEsA+fNdZyFqfNemBlpBAwhKzVuyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=AOUk5rAV; arc=none smtp.client-ip=209.85.217.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="AOUk5rAV" Received: by mail-vs1-f47.google.com with SMTP id ada2fe7eead31-5fc419c346fso700803137.2 for ; Fri, 20 Feb 2026 11:02:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1771614170; x=1772218970; 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=trvZR2sCF4V60jHjOkl0avZ915H6as3fJB6OlIOoH5U=; b=AOUk5rAV+hlsJaXE1F+bnciosMajG7pl6bg+mIRhdq+zzlDAndmIYksPbOOI2e43Bv bNOgkViOVd7LCRABYVG8G2IAyBx4DXkMI/2J59h6vsIQPZZ5m9u3eCmvhOu7oEhqZtdB 78ldPSzPQJiHHUvH3pLSg6a28yp/WDtg1QZdD+oBuHVX7TKqjkCUeOnKSq3wtsjearE7 /PnAsGCNH3tfYsOnmICFSL14JKTcfzSVWmoeiKYtWpJ3M8uMrizjPrRHK9oCOzZ51YUj NYg9jO3nJYkEmSNQwttNRq/8ULWeSEl+9AGwBulxJJNzWc6446yhNHoo/djvJYXaPpaG vQGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771614170; x=1772218970; 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=trvZR2sCF4V60jHjOkl0avZ915H6as3fJB6OlIOoH5U=; b=iiVBifNo0fum0Ag978oVEV3k92Ln2nsXNK5SoRrBEFtlNUGHrccZyO4U89MiPaZIJW MLPSATWVViYooApuDo+mNHitdsTBJ+9sGuWPQlHQuayKL3XFPJClUqqeyURLoTlCKkFq 5Y39WGvcWQKXDdo2DEoQstRaJBF9HKHp68UVJkbRYhuonqMapkjhVrtzP+RiWYy05HZL thjYyx/5Itg0ztlMjctAguFgzqVhu2f2lkK9UPI4TSkE9Rm7nYDpISLyM3cYIIpet9ZA GqqaT0WxJWmVR4wq4PpcxYw5SaVdOd8miAXpHIc/09/+WN0XbOvCtC3ggjyFP4TQ7Tud UmfA== X-Forwarded-Encrypted: i=1; AJvYcCV2f/Cyh/CuwS6dPFPdQoI0axdTt5wCIvjOfMa7QO6wk8QkHX60F4XinG7kHG5kx4dx3/C20pnXQMJqUCw=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+k/73OiMV3hqM3e9s8RBwBsx/BHuY2H1Vfv4XhbPmmDgdbriw kXROGOljYmJra+vd7xjc9es/WCNwmm5TXk06/OK6xGqnjImRT9gvxFF/vZ8Q/epZw2U= X-Gm-Gg: AZuq6aJrs+Q0OpKzNEzLb78/slVtGG2ByrZB6bAmTvtSIeXNkIbhvLUHcGzdT7UpUF6 08U7TnadO2x8JZ8tDq6hlVBKEF5Cqw0zkiTLmnHVyF0QXlyVmof4iQBm1YCzguk9qmTPLSO51Hb pWr3UbyuiAWXPQ/W/LarGx9ZNfflqORweq3IngYlPZ/ynGAIxg1SpobEAEQD8o7Bl0YOVfo87je I3HAPobFerHtLph3GmnZPq4KlQvk8VviTSXPkQnYmUpW8iNpMwVWBQ9wRJAGHQHphJOZWOgEXyR 8vy3z7uBoQ5e6CrNcsFwDIg8HH8ZZW0ICzmMQdDre/HDvZyLbRmjYrvzUfMw65nmVy26V8DUmW3 iHoX1/P5DY+W/4U2G7RdHB6muP/WlfBt96cojl4qosOPNQTaLie6PamLfrxGuDvY0yXJoyhJbNt Uhtd0EFKWbiPTHai3K8KdW6A== X-Received: by 2002:a05:6102:a4f:b0:5ee:a7e9:f157 with SMTP id ada2fe7eead31-5feb31253ddmr438759137.40.1771614169735; Fri, 20 Feb 2026 11:02:49 -0800 (PST) Received: from localhost ([2603:7000:c00:3a00:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-5070d6df498sm488911cf.30.2026.02.20.11.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 11:02:49 -0800 (PST) Date: Fri, 20 Feb 2026 14:02:48 -0500 From: Johannes Weiner To: "JP Kobryn (Meta)" Cc: linux-mm@kvack.org, mst@redhat.com, mhocko@suse.com, vbabka@suse.cz, 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, 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 Subject: Re: [PATCH v5] mm: move pgscan, pgsteal, pgrefill to node stats Message-ID: References: <20260219235846.161910-1-jp.kobryn@linux.dev> 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: <20260219235846.161910-1-jp.kobryn@linux.dev> On Thu, Feb 19, 2026 at 03:58:46PM -0800, JP Kobryn (Meta) wrote: > 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, pgsteal, and pgrefill 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. > > Finally, the virtio_balloon driver is updated to use > global_node_page_state() to fetch the counters, as they are no longer > accessible through the vm_events array. > > Signed-off-by: JP Kobryn > Suggested-by: Johannes Weiner > Acked-by: Michael S. Tsirkin > Reviewed-by: Vlastimil Babka (SUSE) Acked-by: Johannes Weiner