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 849E6C433EF for ; Tue, 17 May 2022 06:56:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C41E76B0081; Tue, 17 May 2022 02:56:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF4106B0082; Tue, 17 May 2022 02:56:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE1C88D0003; Tue, 17 May 2022 02:56:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9FCFE6B0081 for ; Tue, 17 May 2022 02:56:42 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 71EF460848 for ; Tue, 17 May 2022 06:56:42 +0000 (UTC) X-FDA: 79474327044.24.006DE4B Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf18.hostedemail.com (Postfix) with ESMTP id BE4AB1C00B9 for ; Tue, 17 May 2022 06:56:28 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 6D9C3220E3; Tue, 17 May 2022 06:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652770600; h=from:from:reply-to: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=YyW7EIH3WdepBr8smb4cheN1ADPHu7QpG6rwte21Qjg=; b=m/oYQcAlGSR8cd3cSSa95oAkOufK1I7s2sxcoa6y+R7OGFiMvaPHPclIN1g+nPqyCbKcql TYd9OdyuYfZEt21pg+XTSz4TwLd3Q9t9OUyyosOVF2J3jW6SAJwKL137fL8ZS5nyxUByqe 911RSUPqMjG4vbAJlroiO9ipgHFvUiU= 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 22F362C141; Tue, 17 May 2022 06:56:40 +0000 (UTC) Date: Tue, 17 May 2022 08:56:39 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Johannes Weiner , Shakeel Butt , Andrew Morton , David Rientjes , Roman Gushchin , cgroups@vger.kernel.org, Tejun Heo , Linux-MM , Yu Zhao , Wei Xu , Greg Thelen , Chen Wandun Subject: Re: [RFC] Add swappiness argument to memory.reclaim Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: BE4AB1C00B9 X-Stat-Signature: 56mfo6qcuc75e3fdizho9q5rmjmorqkd X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="m/oYQcAl"; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1652770588-981021 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 Mon 16-05-22 15:29:42, Yosry Ahmed wrote: > The discussions on the patch series [1] to add memory.reclaim has > shown that it is desirable to add an argument to control the type of > memory being reclaimed by invoked proactive reclaim using > memory.reclaim. > > I am proposing adding a swappiness optional argument to the interface. > If set, it overwrites vm.swappiness and per-memcg swappiness. This > provides a way to enforce user policy on a stateless per-reclaim > basis. We can make policy decisions to perform reclaim differently for > tasks of different app classes based on their individual QoS needs. It > also helps for use cases when particularly page cache is high and we > want to mainly hit that without swapping out. Can you be more specific about the usecase please? Also how do you define the semantic? Behavior like vm_swappiness is rather vague because the kernel is free to ignore (and it does indeed) this knob in many situations. What is the expected behavior when user explicitly requests a certain swappiness? -- Michal Hocko SUSE Labs