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 82FBAC43334 for ; Tue, 12 Jul 2022 13:55:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 13A4594008A; Tue, 12 Jul 2022 09:55:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C1AE940063; Tue, 12 Jul 2022 09:55:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECB5894008A; Tue, 12 Jul 2022 09:55:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D98C5940063 for ; Tue, 12 Jul 2022 09:55:51 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id AE36460946 for ; Tue, 12 Jul 2022 13:55:51 +0000 (UTC) X-FDA: 79678596102.15.FD2D3D5 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf16.hostedemail.com (Postfix) with ESMTP id 187E718006F for ; Tue, 12 Jul 2022 13:55:50 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id BE2D81FDD2; Tue, 12 Jul 2022 13:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1657634149; h=from:from:reply-to: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=FOGD1+Pys5QynnQhXEiEuQG78R4JKI6sZMZWjJDhA2o=; b=gr986/HEI5p+YkCkkYW9hnvo0fSxzjUS1dFlTAYhadS4FdwJo+KT5CjCW5SvMWIdPhMA8J 2STnRkYVyyrZyVsflerR5FCvRh23zripgo4VT/J5aDessV+n9dKBWEfgfNkmw2C2S/qDgV u/y6IGNwXrgE/TsRCxn+v026qSNjB5Q= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A2DEE2C141; Tue, 12 Jul 2022 13:55:49 +0000 (UTC) Date: Tue, 12 Jul 2022 15:55:49 +0200 From: Michal Hocko To: Chuyi Zhou Cc: Andrew Morton , linux-mm@kvack.org, Roman Gushchin , Johannes Weiner , Shakeel Butt , Muchun Song Subject: Re: [PATCH] mm/vmscan: add pgstall to memcg Message-ID: References: <20220623080103.156628-1-zhouchuyi@bytedance.com> <20220624134218.e25104d902f7fde209728a23@linux-foundation.org> <333e16e8-95a8-20e4-6be4-4cc3a602c7b2@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <333e16e8-95a8-20e4-6be4-4cc3a602c7b2@bytedance.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657634151; a=rsa-sha256; cv=none; b=FdPGINKrk23TaqB/iozXhuOMAGLfHI5LP4V5GffzCF3z61tGQy8C8tCuGM2qfziPvQ4xyl mElxH5+Kniy7NZMGB5zKBRQJuXeDyTRdW+P1NAHf5zoTrhYux17LPfB6n1dmohHPK2U0iK JeEvmAz6Xu4qzUDbL4xCpXN0VuU+yyY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="gr986/HE"; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf16.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657634151; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FOGD1+Pys5QynnQhXEiEuQG78R4JKI6sZMZWjJDhA2o=; b=Xoy0EjihtR4I3k14cEpQmaIjLIDA5xt8VNzB03S82GBBHNk4vU3YLFHtEkPpIcEo0HZ0TP fHycCSEsXECLWDPpXpqwRJ9FXRqZMSuQ67oSkxGHOs77yDodMldw297apEaKBBLyEkP6tX olSzTPmTpNCnc2lI8Gd6/apPMKHh37o= Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="gr986/HE"; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf16.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspam-User: X-Stat-Signature: xxrza666gbqedaqcy77g8uwf7axouqib X-Rspamd-Queue-Id: 187E718006F X-Rspamd-Server: rspam08 X-HE-Tag: 1657634150-69430 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 Tue 12-07-22 17:28:50, Chuyi Zhou wrote: > > > 在 2022/6/25 上午4:42, Andrew Morton 写道: > > (cc memcg developers) > > On Thu, 23 Jun 2022 16:01:03 +0800 zhouchuyi wrote: > > > > > Add pgstall to indicate the times of entering direct reclaim of memcg, use > > > the item of ALLOCSTALL_NORMAL in vmevents to save the data. > > > > > > Signed-off-by: zhouchuyi > > > --- > > > > > > > > > Hi, > > > > > > I notice memcg uses some items to indicate the situation of direct reclaim in memory.stat,such as pgsteal and pgscan. > > > I think there is no harm in adding another item to show the times of entering direct reclaim. > > > > > > > Why do you consider this useful? Do you have a use case? If so, > > please describe it in detail. > > > Since there are allocstall in proc/vmstat which indicate the number of > entering direct reclaim of !cgroup_reclaim, So I think it maybe useful. For > example, users could adjust memory.max to prevent entering direct reclaim > through this item.So what do you think about it ? We already do have events for that - have a look MEMCG_MAX. Can you work with that? -- Michal Hocko SUSE Labs