From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D1F8E7C4FF for ; Thu, 5 Oct 2023 09:06:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFBB66B025E; Thu, 5 Oct 2023 05:06:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EABF46B025F; Thu, 5 Oct 2023 05:06:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9A076B0260; Thu, 5 Oct 2023 05:06:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CAB146B025E for ; Thu, 5 Oct 2023 05:06:35 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 947401A0338 for ; Thu, 5 Oct 2023 09:06:35 +0000 (UTC) X-FDA: 81310827150.10.03A71EE Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf29.hostedemail.com (Postfix) with ESMTP id 8755A120016 for ; Thu, 5 Oct 2023 09:06:33 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Gb7qt86C; spf=pass (imf29.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696496793; a=rsa-sha256; cv=none; b=OT+gSiMhKl6VQO9q0KK41bsbxronRjf+8Q2jGmJP9N3qdnVgqhlaWdUvED5IAix39YcVYc H7qVoxajKqtZboGDzAT57NvNfJVaV9QLr4nQhSdybFB08D/zp86Kr60HFrfW8Zl7FI+Jpq frjNVEVPE0JMv/RcMFzjoVP3O9pAjIs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Gb7qt86C; spf=pass (imf29.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696496793; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=I5mDtqn4ke7EOccXi4sHIRDZaPhR32uiSgJHqJga3Hg=; b=UlZZyxVqGzpIqE+shTr593HaFg1qLsyRPH5K9TN8KdjUhOJpsVkfomjnbRRNN2hMKMfJAt 8rq0ANXSvrDInzMobcokO1/DS4/HpPkc3K+aymVJ7S8kqAtm3RQqWHPVKeyaiGgjz+pgCQ aj0Yy/kOQymEds+IwrnVcFmpGM0aE7E= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5D0D91F892; Thu, 5 Oct 2023 09:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1696496791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I5mDtqn4ke7EOccXi4sHIRDZaPhR32uiSgJHqJga3Hg=; b=Gb7qt86CRw4Q2hcmLffRyrjdC42UtFGR7X8XobT6nxzGeZd1VOa3nm/yNyp5QIqvIBoetq WouqBXaum/wzpjeQ7kyDLPtsvqQOVgrVLp6sUQ9Lkg0DaXIx5lOlQKwx2ZjFWmnT74HH46 qlzfJnMjAXx/r9L0i3c+S+83QdscROA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 22851139C2; Thu, 5 Oct 2023 09:06:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bbGdB5d8HmWVcgAAMHmgww (envelope-from ); Thu, 05 Oct 2023 09:06:31 +0000 Date: Thu, 5 Oct 2023 11:06:29 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Johannes Weiner Cc: Yosry Ahmed , Andrew Morton , Shakeel Butt , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] mm: memcg: refactor page state unit helpers Message-ID: <542ggmgjc27yoosxg466c6n4mzcad2z63t3wdbzevzm43g7xlt@5l7qaepzbth6> References: <20230922175741.635002-1-yosryahmed@google.com> <20230922175741.635002-2-yosryahmed@google.com> <20231004183619.GB39112@cmpxchg.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cdqoo3w6fdlwt4bn" Content-Disposition: inline In-Reply-To: <20231004183619.GB39112@cmpxchg.org> X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 8755A120016 X-Stat-Signature: soorbpayz8rburh9g3tccdi8w6hneio4 X-Rspam-User: X-HE-Tag: 1696496793-420833 X-HE-Meta: U2FsdGVkX1+u3Hhw3Vc5qxJAFxW2voW1lyhAMtHOd3PUUF1/fePTJXb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CSWIm1DjsuEANQABZvP10z41UAiLz3EJXMNJT5PBXNW990dbh4dqstceyVVNJrDB9qTDSCiuNUX+YqLGiYybMc7PEKtgBeVUBrA43zNEl2LZk7NydTv6FfMy6Vzsy91dYmeOgxbVqExQ1908wa+3qXI75Pg3pXA/5tprzDsDifgtDwFJzajUZ9n+mj0d5LfJhFGzgYVNgdcnZ0PSFFijjx1HHjNhj+shAXXwA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --cdqoo3w6fdlwt4bn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 04, 2023 at 02:36:19PM -0400, Johannes Weiner wrote: > Yes, it's because of node resolution which event counters generally > don't have. Some of the refault events influence node-local reclaim > decisions, see mm/vmscan.c::snapshot_refaults(). >=20 > There are a few other event counters in the stat array that people > thought would be useful to have split out in > /sys/devices/system/node/nodeN/vmstat to understand numa behavior > better. >=20 > It's a bit messy. >=20 > Some events would be useful to move to 'stats' for the numa awareness, > such as the allocator stats and reclaim activity. >=20 > Some events would be useful to move to 'stats' for the numa awareness, > but don't have the zone resolution required by them, such as > kswapd/kcompactd wakeups. Thanks for the enlightenment. > Some events aren't numa specific, such as oom kills, drop_pagecache. These are oddballs indeed. As with the normalization patchset these are counted as PAGE_SIZE^W 1 error but they should rather be an infinite error (to warrant a flush). So my feedback to this series is: - patch 1/2 -- creating two classes of units is consequence of unclarity between state and events (as in event=3D=CE=94state/=CE=94t) and resoluti= on (global vs per-node), so the better approach would be to tidy this up, - patch 2/2 -- it could use the single unit class that exists,=20 it'll bound the error of printed numbers afterall (and can be changed later depending on how it affects internal consumers). My 0.02=E2=82=AC, Michal --cdqoo3w6fdlwt4bn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZR58lAAKCRAGvrMr/1gc jrLvAP91rXrkJJRIRNaOZGR9o6ggxOXbwA7LGaBGQc6FSZyomAD/VZ3zJwOcG0uw rVioAhpVnfjLpk/ADrszcFpJ7FRPzQI= =s1VT -----END PGP SIGNATURE----- --cdqoo3w6fdlwt4bn--