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 4EAE8C433EF for ; Fri, 3 Jun 2022 18:26:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C49168D0001; Fri, 3 Jun 2022 14:26:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF88A6B0073; Fri, 3 Jun 2022 14:26:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE6088D0001; Fri, 3 Jun 2022 14:26:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9B6E56B0072 for ; Fri, 3 Jun 2022 14:26:32 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6C76020CD8 for ; Fri, 3 Jun 2022 18:26:32 +0000 (UTC) X-FDA: 79537755024.24.1BC94AE Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf09.hostedemail.com (Postfix) with ESMTP id 036FE140010 for ; Fri, 3 Jun 2022 18:26:15 +0000 (UTC) Date: Fri, 3 Jun 2022 11:26:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1654280789; 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: in-reply-to:in-reply-to:references:references; bh=6P5lQp7f1U6MO1nhpEo5fz8dqgLk7uC+qLCjNkbqKlk=; b=kJT9JFrPbx/E8af9vqV3vzJQ6fXdHUE3mDvehEEMY+MuQPB36/c3xrUq+gxk/NxA8PtD6A PGVevMn3UXxXer7tyzQ2QtToYQuWZGrHJkE214vC/LRtDwzi7B2yUZhJOiO/lxTyamY3Um +So9hpmTUwJ7udfeQkRmftxFvmbKyhI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Qi Zheng Cc: mhocko@kernel.org, hannes@cmpxchg.org, shakeelb@google.com, songmuchun@bytedance.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH] mm: memcontrol: separate {pgscan,pgsteal}_{kswapd,direct} items in memory.stat of cgroup v2 Message-ID: References: <20220603070423.10025-1-zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220603070423.10025-1-zhengqi.arch@bytedance.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Stat-Signature: 8bygk6u7d8xm8pxb5dmrqccnujbyetgy X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=kJT9JFrP; spf=pass (imf09.hostedemail.com: domain of roman.gushchin@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 036FE140010 X-HE-Tag: 1654280775-474817 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: On Fri, Jun 03, 2022 at 03:04:23PM +0800, Qi Zheng wrote: > There are already statistics of {pgscan,pgsteal}_kswapd and > {pgscan,pgsteal}_direct of memcg event here, but now the sum > of the two is displayed in memory.stat of cgroup v2. > > In order to obtain more accurate information during monitoring > and debugging, and to align with the display in /proc/vmstat, > it better to display {pgscan,pgsteal}_kswapd and > {pgscan,pgsteal}_direct separately. > > Moreover, after this modification, all memcg events can be > printed with a combination of vm_event_name() and memcg_events(). > This allows us to create an array to traverse and print, which > reduces redundant seq_buf_printf() codes. > > Signed-off-by: Qi Zheng Acked-by: Roman Gushchin Thanks!