From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b8-smtp.messagingengine.com (flow-b8-smtp.messagingengine.com [202.12.124.143]) (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 AF0782609C5 for ; Mon, 16 Feb 2026 11:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.143 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771243132; cv=none; b=Xwx+1xnCPdGy5M/9fLtEWlt7r8apabY/fT4MBsFLjcH38qnE5vXdCig3Chb8QGlcNKW0REOcvV3rY6hm9MXVicTe+25SQFH7bQkgYMe0TXdsQfg3KYl+uv8CwUh5dUIYlkvBnOvL85Tkh2v5YOiMcWOHV2f7MndCDhq1FqXA48U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771243132; c=relaxed/simple; bh=YP7TAPyhOhX87bvE3n5vkiTQcjtxVLmOvoHYrw3eIJ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ITdXyFT4i93f92z/DmFmKdP/7K3gqsqxGjCcp1YWUIHdogxaD3cakTXDSbcpQ7kYJHqwTdfd3w19qENGqUD0CcC0woxdyCinS7/LQVoz31FjwpLXV31bcb2r1XOpcLyvcp+PJopNCizRqab44xbZvBg9yc9sTrZNid+HcvyLPUQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=RWlwbz6Q; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=eXfAqcJv; arc=none smtp.client-ip=202.12.124.143 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="RWlwbz6Q"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="eXfAqcJv" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailflow.stl.internal (Postfix) with ESMTP id 5B6331300FB5; Mon, 16 Feb 2026 06:58:50 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 16 Feb 2026 06:58:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1771243130; x= 1771250330; bh=Txb1GlfaNj6QsBkGXL0Y8LX/T2eZ3egoSe8EqeDF3Kw=; b=R Wlwbz6Q5IXK7qBQ3q0uMQFp+RRNtCL9XxXVLL4kRsNl49e3B/58+p/cTIFYu+A90 sEzjim3C7EvJewipYCGqeINLRR3hg65jCFxZHU1/3OrPlNTG5G2FVhmoj/FDco3g bFP9k04Js0dMWAgUPqV+Cb+60CzgAvSYhtjWu68Hz1nJ3t+gwcCaWr9lBV0U93QD G/6Gd8ZguxguxonJvklK1kZMHhylmtlrGpQvb8Z7gEASzgeZtePmk5ui0Xfxqtv4 2EEcmbYwNRm5UJNXca1jwv9O4XOOkk/hmU420xvIrMA54L8iF4Yk9Ps/OVM1lyiH 5gYgTAtTjq2DLP3sO0FNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1771243130; x=1771250330; bh=Txb1GlfaNj6QsBkGXL0Y8LX/T2eZ3egoSe8 EqeDF3Kw=; b=eXfAqcJv2jMzeyA+pUwXx6/kyaCkwJmH5aqap0KrfTwpB/wZ4rN 4Fm39bR4GjYG1UtdiYeVx0RTkwAALGgJtWOSWqY5tRiOXw7sGW6wRGBVo8AphS47 Re6Lm2hCR/AJXkwOx/swSR4PVBOLV+hCrYsQRECS5xMOVAQZxEr48k4Ih7Cw2JLh 8gi/gHYlVId0Nq7KNxsmoAmDK72mJDm3jEqxegleUUbdFxt6O39XBfk9l8gJV0aA Vpl+pf5EBXyDQ+oNhCe24pNyy+4JfqFVgvv+MWYLbG4zgNwAgYcR0GvALNZP/D50 DVhZF/ob3hDf3rYqSsHf09StfNV0D0aoJ5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvudeikeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepmfhirhihlhcu ufhhuhhtshgvmhgruhcuoehkihhrihhllhesshhhuhhtvghmohhvrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepfeetheejudeujeeikeetudelvdevkeefuddtkedvtdehtdetieeu ieetjeeugedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepkhhirhhilhhlsehshhhuthgvmhhovhdrnhgrmhgvpdhnsggprhgtphhtthhopedv vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggrvhhiugeskhgvrhhnvghlrd horhhgpdhrtghpthhtohephhgrohifvghntghhrghovddvsehgmhgrihhlrdgtohhmpdhr tghpthhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtihhonhdrohhrghdprhgtph htthhopehlohhrvghniihordhsthhorghkvghssehorhgrtghlvgdrtghomhdprhgtphht thhopehlihgrmhdrhhhofihlvghtthesohhrrggtlhgvrdgtohhmpdhrtghpthhtohepvh gsrggskhgrsehsuhhsvgdrtgiipdhrtghpthhtoheprhhpphhtsehkvghrnhgvlhdrohhr ghdprhgtphhtthhopehsuhhrvghnsgesghhoohhglhgvrdgtohhmpdhrtghpthhtohepmh hhohgtkhhosehsuhhsvgdrtghomh X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Feb 2026 06:58:47 -0500 (EST) Date: Mon, 16 Feb 2026 11:58:42 +0000 From: Kiryl Shutsemau To: "David Hildenbrand (Arm)" Cc: Wenchao Hao , Andrew Morton , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: Add AnonZero accounting for zero-filled anonymous pages Message-ID: References: <20260214084514.2842745-1-haowenchao22@gmail.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: On Mon, Feb 16, 2026 at 12:45:13PM +0100, David Hildenbrand (Arm) wrote: > On 2/16/26 12:34, Kiryl Shutsemau wrote: > > On Sat, Feb 14, 2026 at 04:45:14PM +0800, Wenchao Hao wrote: > > > Add kernel command line option "count_zero_page" to track anonymous pages > > > have been allocated and mapped to userspace but zero-filled. > > > > > > This feature is mainly used to debug large folio mechanism, which > > > pre-allocates and map more pages than actually needed, leading to memory > > > waste from unaccessed pages. > > > > > > Export the result in /proc/pid/smaps as "AnonZero" field. > > > > I expect it to slowdown /proc/pid/smaps read substantially. I don't > > think this line in smaps worth it. > > > > That's why it's enabled through a command line parameter. One users want the stat and all users on the machine pay the price? That's a poor trade off. In general, smaps scales poorly. It collects a lot of stats and most of them are ignored by user. We need something like statx(2) where user can declare what he is interested in, so kernel won't waste cycles. Kernel cmdline parameter is the wrong place to declare what stats you want to see. -- Kiryl Shutsemau / Kirill A. Shutemov