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 5DB0EFC6168 for ; Fri, 13 Sep 2024 16:58:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E2F66B009E; Fri, 13 Sep 2024 12:58:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8933C6B00A6; Fri, 13 Sep 2024 12:58:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 732066B00BF; Fri, 13 Sep 2024 12:58:37 -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 5399B6B009E for ; Fri, 13 Sep 2024 12:58:37 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B63A8A7D3E for ; Fri, 13 Sep 2024 16:58:36 +0000 (UTC) X-FDA: 82560323832.24.8078583 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) by imf06.hostedemail.com (Postfix) with ESMTP id BD42D180002 for ; Fri, 13 Sep 2024 16:58:34 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=TX2SlihM; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.177 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726246636; a=rsa-sha256; cv=none; b=3pSVjoNp8/mM/EGqpmDvP5fnwPQFQcmyL2dDCP+FQ6pCdv0usP9xi31a61xw1VSoNqQBto 1KFv77SKYI1OSrbM5F1HvrLUp4zEYW6b1DrR1ZPa/ORdaRFOvIVIQSz0WQPN36vy2Pv0GQ 9BNuGkzzioIf4Keq1DFi+aPNVeZ6i2k= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=TX2SlihM; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.177 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726246636; 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=6G5mMKC6xXn5CUvXE/ulqU9/kZwXpk5g17KcNxtbO38=; b=A3v14mtiI90VQM3dNHfyDNSNlIOnVOqtXUdGeIhkQ/ECT2VPJOklFEaZ5gdGNdRZH9lYtp 5WQMtbwPNKa/gF0cENKpupLtvsHmRciNJ7+Ws/XqrYR1b7Y9lRmEEJf/t7/AZDe7GRNfUQ PEQ4rOYJec4lX25BO2mldaqSD2p3RHY= Date: Fri, 13 Sep 2024 09:58:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1726246712; 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=6G5mMKC6xXn5CUvXE/ulqU9/kZwXpk5g17KcNxtbO38=; b=TX2SlihM1SEdJ9sQHg5KxZ/yV9N6GBhaa67Qk8E4pRlGH9eJOk5/ZDoyY4FPG9B5fSIZGr TCIcmStF17IMEd4+Iik6keHBXpY0k4wk0xy05/dd2mxzdfEqW6GFSbIenNCKOkqN3lVUGW Ay1pARFw5aXE3PURYjV1IGzRWd+HkYk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: jingxiang zeng Cc: Jingxiang Zeng , linux-mm@kvack.org, Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memcontrol: add per-memcg pgpgin/pswpin counter Message-ID: References: <20240830082244.156923-1-jingxiangzeng.cas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: BD42D180002 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: dsecupxyup1aqomg9nrsxg8i1qkuu91o X-HE-Tag: 1726246714-44156 X-HE-Meta: U2FsdGVkX1+2RZjqLlrPOS/uWxGHoqAA/o6S7YYCEGf323/V0xAuDhqWC7qvdXi8cUFnANBMIEp2DitdFjfBkYcUVUjCmnPck7iNbsHyZZ0W+wIEmyL9ncAII223TQ3olEdEN0DWHlBgf/HVQcAtcIQ9Db4lfmv+DhKg9IiMsxHNlVPbXPuxLKrI09mHaZ4OFX4qyTSgaJCxQ36uCCNxptB370LsZYw+KaecNVgGMpOM9TzeIFPVJrv6fy3Y1Hx7PHh6FLL4pJIw6malqcXikNkfNgYzsZKbPY+MArKk3UBVYLequw3GM1ie6zVzoDcUv/M9I0Jn22H57FpZosjAF8BpGPmYhS3dgpmLmfC1jX1GbUWqmt5Gcj23ZjXnApNVPa/naOWJrP5mJuioxQpR66OOYwjyseA39xHNSm+ixbRjqh72TSnRLhjJOE0GWuxrRj5qroU6r+KhhXV7pk5CNC9gDzW8ZFB3McPg1hFREKYEKGSQ9DF2/Lbjv1LowBt50whEkKv+tsQYG38UoOUiLhbt6dPFIziXerh+c6zYiq9A0tTI3dSv7EIfq+2CQElsF7bxm+gp4nS+mO3+GFNx3d/Q3CkFDu34x0peqh/MpjWBV/EDapQIxJjGhE5/6U98cGkhz/+5TK3GLnp/4JkcQNZn3no3YpwL4FUueKdxXP5mTcOP8U5Gst10jjByCWtw0ddqr+TKxZat6iKK4la0ChZnA5t7NJ4U77C3tbGxtCx7n63mvljG/p0OZWQ+xViSNigIbG4LU7H0pSjCESSyx3GNNTOH99h8/lmzXYn6D+Tz1HwghOqiexNM/BXuBReQ0gq67kyydmyQBZj+j+m5nvKOi0pyUwxvD8+hMi7uxqAKv//Vnw0B3zuv3jHKREI3hGoTdQoDDBG0e/xBa/Ls45fHBtClt20q1+etkNvEcFcfJX1pQ9YUyeghF5o/Bk/hy/DLhG0NGpFgp30GrM1 NI44eEzX Z/dWjaWnECUE4zCV/ofvQj4l+Dxm3AORvNw+I5jqpIem9Cgp1ZQzvU3eH/A0NWBYHpcndmWEoa1b4pGUxcyRE5CYozXqytLUqb0ytvDF1B9jT6aij3lFXTR36KlQP7yO3uGk1oT/kEvLX/1bWTTqXdmu3KbitWBMtYGSo3X7WyGfm7VgRI3Gx+CXO4KEmBPhinhkuRGevQSQg6p0VEefooejq0groFiDkmlmHHDO6ECwtI+qviq8+3mxM6g== 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: List-Subscribe: List-Unsubscribe: On Fri, Sep 13, 2024 at 04:05:51PM GMT, jingxiang zeng wrote: > On Tue, 10 Sept 2024 at 15:10, Shakeel Butt wrote: > > > > On Fri, Aug 30, 2024 at 04:22:44PM GMT, Jingxiang Zeng wrote: > > > From: Jingxiang Zeng > > > > > > In proactive memory reclamation scenarios, it is necessary to > > > estimate the pswpin and pswpout metrics of the cgroup to > > > determine whether to continue reclaiming anonymous pages in > > > the current batch. This patch will collect these metrics and > > > expose them. > > > > Please explain a bit more on how these metrics will be used to make > > a decision to continue to do proactive reclaim or not. > > Currently there is simply no way to know exactly how many anon page > was faulted in through SWAP for each cgroup. One may use > workingset refault as an indicator but it is inaccurate due to shadow reclaim. > > We have a proactive reclaim agent that sets a forced swappiness > dynamically for each reclaim, so we can reclaim file or anon pages striclty. > Knowing the anon page swapin status is a huge win for estimating the > workload status. > > And the swapout info is also important for getting an idea of how much > swapout is effective for a cgroup. > Please add all these details on your proactive reclaim agent in the commit message. It would be beneficial to others doing proactive reclaim.