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 70F3FC4167B for ; Thu, 30 Nov 2023 15:57:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E88046B0424; Thu, 30 Nov 2023 10:57:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E37BF6B0425; Thu, 30 Nov 2023 10:57:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D009F6B0426; Thu, 30 Nov 2023 10:57:48 -0500 (EST) 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 C1CA36B0424 for ; Thu, 30 Nov 2023 10:57:48 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8435A1C01F7 for ; Thu, 30 Nov 2023 15:57:48 +0000 (UTC) X-FDA: 81515076216.28.5B43624 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf27.hostedemail.com (Postfix) with ESMTP id A250140017 for ; Thu, 30 Nov 2023 15:57:44 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf27.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 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=1701359865; 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; bh=1D3TFF6ev1LLgi6jXt7evWEzzieFaFQmF6nIiDOQm3c=; b=CzFB9PeCJot7DP2tZ+K/Kb0Q+VJy0i34a9C8+KfjGn5wHFsFO5m58VVM4zxGveaDlsiNdR aI8SSDcajYhnb55iyvUHDq4bmDTjbPlo2n3niccSBx/QwgC3vt6FCKygzhKhmgZD6jUFNC UCx20Lgw3BeqCyxVHWexfnQMNGt/5mE= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf27.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701359865; a=rsa-sha256; cv=none; b=G3dYpEwW9Bd/6k2Pw25jxv0y9W1/A5AJGa7f9K24pAWVHhKz8DA7j7Yr1tm+x9s5txXGcy kiq9S9/bi48SnCmIYlP16ww/GouChG7AYB9ahbRmj+yNw2UQBwTdBRuS5PhQfY7xxbkGl4 mMw0AguWLDOFUNjTNhQeLCayzoum7C8= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7E3EF1FCF5; Thu, 30 Nov 2023 15:57:42 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 42C4213AB1; Thu, 30 Nov 2023 15:57:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id /unbCvawaGWqagAAD6G6ig (envelope-from ); Thu, 30 Nov 2023 15:57:42 +0000 Date: Thu, 30 Nov 2023 16:57:41 +0100 From: Michal Hocko To: Dan Schatzberg Cc: Johannes Weiner , Roman Gushchin , Yosry Ahmed , Huan Yang , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt , Muchun Song , Andrew Morton , David Hildenbrand , Matthew Wilcox , Huang Ying , Kefeng Wang , Peter Xu , "Vishal Moola (Oracle)" , Yue Zhao , Hugh Dickins Subject: Re: [PATCH 0/1] Add swappiness argument to memory.reclaim Message-ID: References: <20231130153658.527556-1-schatzberg.dan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130153658.527556-1-schatzberg.dan@gmail.com> X-Spamd-Bar: +++++++++++++++ X-Spam: Yes X-Rspamd-Queue-Id: A250140017 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: osjdo6xhm58arzaz9ifweexjbzojdtbp X-HE-Tag: 1701359864-724810 X-HE-Meta: U2FsdGVkX19Jfy3nSRNoyYXrKK1L3iax1jS3gTxZWeupCl4G/CgNZoIG1eZjXkDdKbQ5aIavxbGQzFrOyu7kR9AYrDQAbkv+IHsbTNCCOBRD9283e3cto6du36VCn1N6oD2WyLkNYDJkpHJqgvSg4IS/vWx2EsTcHi9kmEsu1iAj+fo+UVr06xqXv1BhXfoPz//DFvJ91OczYmaPrSXAj2Q4dBDdpRX/NwNWIcK67fGTgkj5SaYVOZoevCG0J1WeNfNKvl4xTWVIwLh9StJm53hKwNhlcdYb/tKGNNu8rpJDh2E+ffiVHOO05aYGEB4eArvTYbEF/p1YHSGWr0H1rfhBlLqvuQINRLEe5CoflFnsmhz/0EsGjhp1KqkftkrR4244URrQzlCQssniBvD7tj8EJGdgUIlU0zeYHS3pcUru4HBIWehAERIJA+t30Sv0WfaqwL+CpwWbLr+tBTGLEGHTwErm5HaL5EeubBBh6lFF5o2M0Mrbw3nesliohx9tehUsFCmjzHSmH6DTDHw2b/g+hqineoMLs/BJQ2tr6lj2hUebXRbOAaLhX9OGSnQdA62eCpBUiwrf8wzzOtEOG6i1vuFo7OYJuB5OICWXyTunRv+5pSgOk+XWiu+fsJ+o0x1shepYxLX2kz+3feQgB41iazlkSNd80qVM6xIttrOiZIh/PI7SesJUL8RHTRieBfYHwp3o9G8Wx3RY665Gaq+2SrHA7CFmuTXz+4Us4CKcafSdFUENMp8NINAQD5YFp95LwWcI0Hzbu/1WTyhWM1f3lXC9KnCUlo3ac6J5Oyl9bfctK2npFqufA4iDigH3KYpKx8TSCJ8k6wMoq1NkDxGnfdkV/LR6j4bt9v7SKwNVAmAtqeL+dDByRANidDUGxRu4W2M/0fNvj9BWsnFFNiQBZRvAIKTuyLcE7NAPdtvkJS/Z1VU3Ka+gtFv0nNBM17BjbQmKd04Gcv2MjPQ v2xWF3/d 6YxrtxsCt7miECj8p3GD5dZw9Rq2x2Adcsw+KG8/7VGXxSqy/hyl2DpzHzT3kM++Xcd11Uu1Iuhd1fHlXliDUs6fm4rsF05oONAIIveP6W7L9klJFrJhIckY3zsES9USprgwoCUEaCKS/RVrSmDMLqH9A+inihv9M6762GLh98FzDXPJGkYHdc6qAA4wdra1RAhsen+ks0/ZjJY+TN2Lq8M+hf8aTdnFVak0ebzKkF9ZvYPelIslFxeKiig== 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 Thu 30-11-23 07:36:53, Dan Schatzberg wrote: [...] > In contrast, I argue in favor of a swappiness setting not as a way to implement > custom reclaim algorithms but rather to bias the balance of anon vs file due to > differences of proactive vs reactive reclaim. In this context, swappiness is the > existing interface for controlling this balance and this patch simply allows for > it to be configured differently for proactive vs reactive reclaim. I do agree that swappiness is a better interface than explicit anon/file but the problem with swappiness is that it is more of a hint for the reclaim rather than a real control. Just look at get_scan_count and its history. Not only its range has been extended also the extent when it is actually used has been changing all the time and I think it is not a stretch to assume that trend to continue. Now if we extend the user interface to trigger the reclaim do we expect that we always do SCAN_EQUAL if a user specifies swappiness or are we OK that the implementation is free to ignore that "hint"? -- Michal Hocko SUSE Labs