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 28FE7C35FFF for ; Wed, 19 Mar 2025 09:49:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 601B7280002; Wed, 19 Mar 2025 05:49:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B090280001; Wed, 19 Mar 2025 05:49:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 478A1280002; Wed, 19 Mar 2025 05:49:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 29F48280001 for ; Wed, 19 Mar 2025 05:49:29 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B645EB73ED for ; Wed, 19 Mar 2025 09:49:30 +0000 (UTC) X-FDA: 83237828100.09.131876C Received: from va-1-14.ptr.blmpb.com (va-1-14.ptr.blmpb.com [209.127.230.14]) by imf28.hostedemail.com (Postfix) with ESMTP id 545BBC0006 for ; Wed, 19 Mar 2025 09:49:28 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=lixiang-com.20200927.dkim.feishu.cn header.s=s1 header.b=2c6ogcTq; spf=pass (imf28.hostedemail.com: domain of jiahao1@lixiang.com designates 209.127.230.14 as permitted sender) smtp.mailfrom=jiahao1@lixiang.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1742377769; 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=k24cNlJNstGfbgY3l7HThEBILzmm9V5mpmmPJ3oYywA=; b=n8fWFrfuw+45R1B1WsxYaf3mx5Smw8pOLghTbn4WJYR6JS1IkwnkgDg52bl+YUGsw2eeyt hA8KFXH83Zcff8EmLjh54zAIZlnXoa0/zKbcawWUo1MK90UmTh3CIPi5NOL3UaXJlnKR3T MmADlmZP2ycdIXa8/A6rfq9X0etJ9p4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=lixiang-com.20200927.dkim.feishu.cn header.s=s1 header.b=2c6ogcTq; spf=pass (imf28.hostedemail.com: domain of jiahao1@lixiang.com designates 209.127.230.14 as permitted sender) smtp.mailfrom=jiahao1@lixiang.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1742377769; a=rsa-sha256; cv=none; b=g+WJMfCEsTKSJXLFXEQkG/3122Rkrot39xBFxEmM/97/IS3xjP9eyhzK7wNEKRwgJyyKt9 jsF46JxX3MPi4TGqPKVeWD8aEfkjIadTq2Hzy4qNonOwEoaL5Z2cek8mnAUDSOGpCXmEK3 WpTMz7a5+P7eg5WVhV0XawBKSRH5zVI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=lixiang-com.20200927.dkim.feishu.cn; t=1742377762; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=k24cNlJNstGfbgY3l7HThEBILzmm9V5mpmmPJ3oYywA=; b=2c6ogcTqYsD2/4QFXTfWAVbf3BJs41m8uUO9l1WBRWSdvcoyRL8s3GZRRFPBjoRZfsI459 q80s9H2wiwdxN1LBxMqQzbGTrs+yG9zB23Spe2CpRhqFlu/thGUYTbLI/Bq6frbkYWyH31 0qDuhRgwFc0bc1byAdBTWQ1k8ODvzQ0gK8wuWTrNK1rrLEjbm4KQAPLuh4GSbUilndwih4 4Vj7zS3iTsAXJB7J0QsqiBfscRg/ALqGicNqPNKfWuhvX86Ph3aABPw1bM5hUa5fWTYrZ7 2nlUaqT1EtPbtpjCKzZ3PsDOCQJIh4toY/mYnSi9P0F1Va23/d/EPCgTqVkDqQ== Cc: , , , , , , , , , , , From: "Hao Jia" Subject: Re: [PATCH 1/2] mm: vmscan: Split proactive reclaim statistics from direct reclaim statistics User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Message-Id: <3a7a14fb-2eb7-3580-30f8-9a8f1f62aad4@lixiang.com> Content-Transfer-Encoding: 8bit Received: from [10.251.1.1] ([60.190.250.155]) by smtp.feishu.cn with ESMTPS; Wed, 19 Mar 2025 17:49:19 +0800 References: <20250318075833.90615-1-jiahao.kernel@gmail.com> <20250318075833.90615-2-jiahao.kernel@gmail.com> To: =?utf-8?q?Michal_Koutn=C3=BD?= , "Hao Jia" Date: Wed, 19 Mar 2025 17:49:15 +0800 Mime-Version: 1.0 X-Original-From: Hao Jia Content-Type: multipart/alternative; boundary=56f19c7c5a2f19ffae0c932a3155422fcb2c4c6221596e68a37158e53b0c In-Reply-To: X-Lms-Return-Path: X-Rspam-User: X-Rspamd-Queue-Id: 545BBC0006 X-Rspamd-Server: rspam08 X-Stat-Signature: p5pyu4ag1gcmqwfa4gn9f45rpmutii7m X-HE-Tag: 1742377768-477380 X-HE-Meta: U2FsdGVkX18XnAEv2a8vcJxzyeiRNL/jQ3X3gQ71uRIcwpT4fsskXggWt7zx57HKyFDSYqokxHSyMKTiSxULN3uv4rdrWEN9VaZMnxFPDOaUTBbCJMJZTTo1kamqBQj79IgSE+BVtuqAwFrOrpW1vmw+7phxZwncEagor+LXi98VlXRFCb4jsDdRU2is+W/VChBmobp8+N9Dq6ScNIZUoO7LfRmXY/WKcF9rHLs2/TCDAhMIxlUW6MXfpkpCPUQgWuUT2tGUdIBMEv1FaQthwrJp9B0u6q/9+1Jaa6ApJzrylnD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fz56opydUaOaRomC3FV0TRuilHEvy09dffYoioI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.018828, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --56f19c7c5a2f19ffae0c932a3155422fcb2c4c6221596e68a37158e53b0c Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On 2025/3/19 17:15, Michal Koutn=C3=BD wrote: > On Wed, Mar 19, 2025 at 10:38:01AM +0800, Hao Jia wrote: >> However, binding the statistics to the memory.reclaim writers may not be >> suitable for our scenario. The userspace proactive memory reclaimer trig= gers >> proactive memory reclaim on different memory cgroups, and all memory rec= laim >> statistics would be tied to this userspace proactive memory reclaim proc= ess. >=20 > It thought that was what you wanted -- have stats related precisely to > the process so that you can feedback-control the reclaim. What I want is the proactive memory reclamation statistics for each=20 memory cgroup. >=20 >> This does not distinguish the proactive memory reclaim status of differe= nt >> cgroups. >=20 > a > `- b > `- c >=20 > Or do you mean that you write to a/memory.reclaim and want to observe > respective results in {b,c}/memory.stat? root `- a `- b`- c We have a userspace proactive memory reclaim process that writes to=20 a/memory.reclaim, observes a/memory.stat, then writes to=20 b/memory.reclaim and observes b/memory.stat. This pattern is the same=20 for other cgroups as well, so all memory cgroups(a, b, c) have the=20 **same writer**. So, I need per-cgroup proactive memory reclaim statistics. Thanks, Hao =E5=A3=B0=E6=98=8E=EF=BC=9A=E8=BF=99=E5=B0=81=E9=82=AE=E4=BB=B6=E5=8F=AA=E5= =85=81=E8=AE=B8=E6=96=87=E4=BB=B6=E6=8E=A5=E6=94=B6=E8=80=85=E9=98=85=E8=AF= =BB=EF=BC=8C=E6=9C=89=E5=BE=88=E9=AB=98=E7=9A=84=E6=9C=BA=E5=AF=86=E6=80=A7= =E8=A6=81=E6=B1=82=E3=80=82=E7=A6=81=E6=AD=A2=E5=85=B6=E4=BB=96=E4=BA=BA=E4= =BD=BF=E7=94=A8=E3=80=81=E6=89=93=E5=BC=80=E3=80=81=E5=A4=8D=E5=88=B6=E6=88= =96=E8=BD=AC=E5=8F=91=E9=87=8C=E9=9D=A2=E7=9A=84=E4=BB=BB=E4=BD=95=E5=86=85= =E5=AE=B9=E3=80=82=E5=A6=82=E6=9E=9C=E6=9C=AC=E9=82=AE=E4=BB=B6=E9=94=99=E8= =AF=AF=E5=9C=B0=E5=8F=91=E7=BB=99=E4=BA=86=E4=BD=A0=EF=BC=8C=E8=AF=B7=E8=81= =94=E7=B3=BB=E9=82=AE=E4=BB=B6=E5=8F=91=E5=87=BA=E8=80=85=E5=B9=B6=E5=88=A0= =E9=99=A4=E8=BF=99=E4=B8=AA=E6=96=87=E4=BB=B6=E3=80=82=E6=9C=BA=E5=AF=86=E5= =8F=8A=E6=B3=95=E5=BE=8B=E7=9A=84=E7=89=B9=E6=9D=83=E5=B9=B6=E4=B8=8D=E5=9B= =A0=E4=B8=BA=E8=AF=AF=E5=8F=91=E9=82=AE=E4=BB=B6=E8=80=8C=E6=94=BE=E5=BC=83= =E6=88=96=E4=B8=A7=E5=A4=B1=E3=80=82=E4=BB=BB=E4=BD=95=E6=8F=90=E5=87=BA=E7= =9A=84=E8=A7=82=E7=82=B9=E6=88=96=E6=84=8F=E8=A7=81=E5=8F=AA=E5=B1=9E=E4=BA= =8E=E4=BD=9C=E8=80=85=E7=9A=84=E4=B8=AA=E4=BA=BA=E8=A7=81=E8=A7=A3=EF=BC=8C= =E5=B9=B6=E4=B8=8D=E4=B8=80=E5=AE=9A=E4=BB=A3=E8=A1=A8=E6=9C=AC=E5=85=AC=E5= =8F=B8=E3=80=82 Disclaimer: This email is intended to be read only by the designated recipi= ent of the document and has high confidentiality requirements. Anyone else = is prohibited from using, opening, copying or forwarding any of the content= s inside. If this email was sent to you by mistake, please contact the send= er of the email and delete this file immediately. Confidentiality and legal= privileges are not waived or lost by misdirected emails. Any views or opin= ions expressed in the email are those of the author and do not necessarily = represent those of the Company. --56f19c7c5a2f19ffae0c932a3155422fcb2c4c6221596e68a37158e53b0c Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

On 2025/3/19 17:15, Michal Koutn=C3=BD wrote:
> On Wed, Mar 19, 2025 at 10:38:01AM +0800, Hao Jia wrote:
>> However, binding the statistics to the memory.reclaim writers may no= t be
>> suitable for our scenario. The userspace proactive memory reclaimer = triggers
>> proactive memory reclaim on different memory cgroups, and all memory= reclaim
>> statistics would be tied to this userspace proactive memory reclaim = process.
>=20
> It thought that was what you wanted -- have stats related precisely t= o
> the process so that you can feedback-control the reclaim.


What I want is the proactive memory reclamation statistics for each=20
memory cgroup.

>=20
>> This does not distinguish the proactive memory reclaim status of dif= ferent
>> cgroups.
>=20
> a
> `- b
> `- c
>=20
> Or do you mean that you write to a/memory.reclaim and want to observe
> respective results in {b,c}/memory.stat?

root
`- a `- b`- c

We have a userspace proactive memory reclaim process that writes to=20
a/memory.reclaim, observes a/memory.stat, then writes to=20
b/memory.reclaim and observes b/memory.stat. This pattern is the same= =20
for other cgroups as well, so all memory cgroups(a, b, c) have the=20
**same writer**. So, I need per-cgroup proactive memory reclaim statist= ics.


Thanks,
Hao


<= div style=3D"text-align: left;">= =E5=A3=B0=E6=98=8E=EF=BC=9A=E8=BF=99=E5=B0=81=E9=82=AE=E4=BB=B6=E5=8F=AA=E5= =85=81=E8=AE=B8=E6=96=87=E4=BB=B6=E6=8E=A5=E6=94=B6=E8=80=85=E9=98=85=E8=AF= =BB=EF=BC=8C=E6=9C=89=E5=BE=88=E9=AB=98=E7=9A=84=E6=9C=BA=E5=AF=86=E6=80=A7= =E8=A6=81=E6=B1=82=E3=80=82=E7=A6=81=E6=AD=A2=E5=85=B6=E4=BB=96=E4=BA=BA=E4= =BD=BF=E7=94=A8=E3=80=81=E6=89=93=E5=BC=80=E3=80=81=E5=A4=8D=E5=88=B6=E6=88= =96=E8=BD=AC=E5=8F=91=E9=87=8C=E9=9D=A2=E7=9A=84=E4=BB=BB=E4=BD=95=E5=86=85= =E5=AE=B9=E3=80=82=E5=A6=82=E6=9E=9C=E6=9C=AC=E9=82=AE=E4=BB=B6=E9=94=99=E8= =AF=AF=E5=9C=B0=E5=8F=91=E7=BB=99=E4=BA=86=E4=BD=A0=EF=BC=8C=E8=AF=B7=E8=81= =94=E7=B3=BB=E9=82=AE=E4=BB=B6=E5=8F=91=E5=87=BA=E8=80=85=E5=B9=B6=E5=88=A0= =E9=99=A4=E8=BF=99=E4=B8=AA=E6=96=87=E4=BB=B6=E3=80=82=E6=9C=BA=E5=AF=86=E5= =8F=8A=E6=B3=95=E5=BE=8B=E7=9A=84=E7=89=B9=E6=9D=83=E5=B9=B6=E4=B8=8D=E5=9B= =A0=E4=B8=BA=E8=AF=AF=E5=8F=91=E9=82=AE=E4=BB=B6=E8=80=8C=E6=94=BE=E5=BC=83= =E6=88=96=E4=B8=A7=E5=A4=B1=E3=80=82=E4=BB=BB=E4=BD=95=E6=8F=90=E5=87=BA=E7= =9A=84=E8=A7=82=E7=82=B9=E6=88=96=E6=84=8F=E8=A7=81=E5=8F=AA=E5=B1=9E=E4=BA= =8E=E4=BD=9C=E8=80=85=E7=9A=84=E4=B8=AA=E4=BA=BA=E8=A7=81=E8=A7=A3=EF=BC=8C= =E5=B9=B6=E4=B8=8D=E4=B8=80=E5=AE=9A=E4=BB=A3=E8=A1=A8=E6=9C=AC=E5=85=AC=E5= =8F=B8=E3=80=82
Discl= aimer: This email is intended to be read only by the designated recipient o= f the document and has high confidentiality requirements. Anyone else is pr= ohibited from using, opening, copying or forwarding any of the contents ins= ide. If this email was sent to you by mistake, please contact the sender of= the email and delete this file immediately. Confidentiality and legal priv= ileges are not waived or lost by misdirected emails. Any views or opinions = expressed in the email are those of the author and do not necessarily repre= sent those of the Company.

--56f19c7c5a2f19ffae0c932a3155422fcb2c4c6221596e68a37158e53b0c--