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 EDB7FECE57A for ; Mon, 9 Sep 2024 10:52:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 594206B015D; Mon, 9 Sep 2024 06:52:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5449C6B015E; Mon, 9 Sep 2024 06:52:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 433116B015F; Mon, 9 Sep 2024 06:52:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 25D396B015D for ; Mon, 9 Sep 2024 06:52:20 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B9815120E3B for ; Mon, 9 Sep 2024 10:52:19 +0000 (UTC) X-FDA: 82544885598.28.2A8EAEE Received: from smtp134-25.sina.com.cn (smtp134-25.sina.com.cn [180.149.134.25]) by imf30.hostedemail.com (Postfix) with ESMTP id A004780016 for ; Mon, 9 Sep 2024 10:52:16 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of hdanton@sina.com designates 180.149.134.25 as permitted sender) smtp.mailfrom=hdanton@sina.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725879062; a=rsa-sha256; cv=none; b=6UWmws+sKuk/VwGhzufcz5M23VB4ma/13cuWwFTLW3sk7essagFIl8m0DoYD0vJ03qx47v Q3ixWlbRZyTJ4t0MLajBWQjF0IRMbZvdOVxnxMacoJgyjZfQOsd0j1XmFTDwbanUvfm3db rV1aKBmik+jzrEPPuEGX15PM+DI82Qk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of hdanton@sina.com designates 180.149.134.25 as permitted sender) smtp.mailfrom=hdanton@sina.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725879062; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ff0EeJRJ+O97zeLQDdw4mm2PSEPAK4hc8nC25fRKbgk=; b=yBbp4nTGzYqms/1V6PTI6a/lDZzbhgmTzuVpM9QO1zayOsllkELHjw9FSUO6oI79OHQnkV PyBa2FA3VCtFi8S+9IF7Hf6hZtxEsbAWnMILORlpsUZ5TFu7BlgFl/ShRLqDojLbB7pnmf lDDDLj97FqepZROiydgn4tLi3AjlECU= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.50.122]) by sina.com (10.185.250.21) with ESMTP id 66DED35700006845; Mon, 9 Sep 2024 18:52:10 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 9132623408182 X-SMAIL-UIID: E5A1A39DA601451EA2E93BE98ABAF976-20240909-185210-1 From: Hillf Danton To: Michal Hocko Cc: Davidlohr Bueso , yosryahmed@google.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] mm: introduce per-node proactive reclaim interface Date: Mon, 9 Sep 2024 18:51:57 +0800 Message-Id: <20240909105157.2663-1-hdanton@sina.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A004780016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: wc6ouy6i68iipu7wfs49dndcdywhxexu X-HE-Tag: 1725879136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4xYs+swFEWq/wLCoiT9Xlfyqfae5JnLHoAgcxd+DffjKqgITJROc4Wkx0zl+1ZsyhlBK15uvYpIoETAEyilYfTO4syIxHn5LP1SLAmii3vHPTaNeboJ7sjdDGjUbdZJeuo0wY6YNAkUd2atQMn9/arvObEjO6y/d9kfNWa+/Oq9Kbj1GkaiaZMgc1lK/a7ffx1AYscUrUK3I= 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 Date: Mon, 9 Sep 2024 09:12:03 +0200 Michal Hocko > On Fri 06-09-24 19:04:19, Hillf Danton wrote: > > On Thu, 5 Sep 2024 16:29:41 -0700 Davidlohr Bueso > > > On Fri, 06 Sep 2024, Hillf Danton wrote:\n > > > >The proactive reclaim on the cmdline looks like waste of cpu cycles before > > > >the cases where kswapd fails to work are spotted. It is not correct to add > > > >it because you can type the code. > > > > > > Are you against proactive reclaim altogether (ie: memcg) or this patch in > > > particular, which extends its availability? > > > > > The against makes no sense to me because I know your patch is never able to > > escape standing ovation. > > I fail to understand your reasoning. Do you have any actual technical > arguments why this is a bad idea? > > > > The benefits of proactive reclaim are well documented, and the community has > > > been overall favorable towards it. This operation is not meant to be generally > > > used, but there are real latency benefits to be had which are completely > > > unrelated to watermarks. Similarly, we have 'compact' as an alternative to > > > kcompactd (which was once upon a time part of kswapd). > > > > > Because kswapd is responsible for watermark instead of high order pages, > > compact does not justify proactive reclaim from the begining. > > What do you mean? How does keeping a global watermark helps to trigger > per NUMA node specific aging - e.g. demotion? > In addition to the cost of pro/demorion, the percpu pages prevent random aging from making any sense without memory pressue, because I think it is aging that rolls out red carpet for multi-gen lru.