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 744ACC433F5 for ; Thu, 19 May 2022 15:29:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D06AB6B0071; Thu, 19 May 2022 11:29:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB5336B0072; Thu, 19 May 2022 11:29:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA5A86B0073; Thu, 19 May 2022 11:29:44 -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 AB3566B0071 for ; Thu, 19 May 2022 11:29:44 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 6E45860CE9 for ; Thu, 19 May 2022 15:29:44 +0000 (UTC) X-FDA: 79482877488.06.7DA3B8C Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) by imf18.hostedemail.com (Postfix) with ESMTP id 9DA261C00D0 for ; Thu, 19 May 2022 15:29:29 +0000 (UTC) Received: by mail-vs1-f41.google.com with SMTP id w10so3332912vsa.4 for ; Thu, 19 May 2022 08:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TTppzXqGXGzezJ0VNR/10YUamTL+Jpn/a+OS4nEwUs0=; b=aJRufbeVPWWTg6xesgVQ92jTkUBXkj4204NtsTRRuXhSDjPb8Xkpo0bNaK4046hFnv mLKgwhvsh9GAmI2LFDkeF6HnSFJOYseaJ+p8tes7OyljSbloK0G+33o31Bpt84fkfCb4 J38wGhcIGfbVqDVaOHU/qKlZO1PRo09oJVwe8Kq8Gjr8j7VY4qHpf1GeZdyugHi00mzw aPj5qp0lnQNuRwPUHk0H544OPn69tIDaGuwVRtFJw5cVWxmIclVYYJ1OVG+xA+X0wkh6 EFpAbJrZNyvmy90Vgh11onsTrIn9w5C0EYbSgXGfpC4kZqk73crIwyt6vZPv3EiDdghA AwgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TTppzXqGXGzezJ0VNR/10YUamTL+Jpn/a+OS4nEwUs0=; b=p4GID/F4ZRK1Hb4qGr0/guRroWa3vFub4lAgzv7dmhnBhwUoHzMIQ2swf9z1On/Ckm heofyd38kWdB0TtBkPRWgCKnqS0jVaHdzdKJ44rZqvgUb5GuqR8dfyvkF2BaDLqN3Kl0 qWeTiCqDWkeKW6Tf4KAtIef/qPtDN1POGk/ZolipncN12CsZuN76eHHNSSAXc/8X59/m QvFBTI6KDHhw26BPuaWKocSZrBOFSRL0w7vs0CoS2hRubFC9AnFW83GSXpksbW8fHKMa lJ/Sf3GuWHcTkknvFi6hvt4SgrxODqjlJgKOBqSXFJjCcDutm2zQDGkvwZf6zfWTi+XB +XLg== X-Gm-Message-State: AOAM532qTjbaXvyM7IscNPlyMoQLJw6DK15ZqDOanfByaY7vwAE7wv/5 2KvO4BT5Z+leYwkLGzTbltYvmwWVigSTrfl9CqMZ1Q== X-Google-Smtp-Source: ABdhPJw+n9H3muNanVvnGzkIcR9olge2SWxTCMxOP9MQ1pcplNiacgRpRo43zTNM6++hw02jtLKmONoAGYelF5/06ZQ= X-Received: by 2002:a05:6102:3ecf:b0:320:7c27:5539 with SMTP id n15-20020a0561023ecf00b003207c275539mr2699219vsv.59.1652974182955; Thu, 19 May 2022 08:29:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Wei Xu Date: Thu, 19 May 2022 08:29:32 -0700 Message-ID: Subject: Re: [RFC] Add swappiness argument to memory.reclaim To: Michal Hocko Cc: Johannes Weiner , Yosry Ahmed , Shakeel Butt , Andrew Morton , David Rientjes , Roman Gushchin , Cgroups , Tejun Heo , Linux-MM , Yu Zhao , Greg Thelen , Chen Wandun Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9DA261C00D0 X-Stat-Signature: 36nqkapz1tb65czoaqgtittmjxq4j6mm X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=aJRufbeV; spf=pass (imf18.hostedemail.com: domain of weixugc@google.com designates 209.85.217.41 as permitted sender) smtp.mailfrom=weixugc@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1652974169-284782 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 Thu, May 19, 2022 at 1:51 AM Michal Hocko wrote: > > On Wed 18-05-22 22:44:13, Wei Xu wrote: > > On Tue, May 17, 2022 at 1:06 PM Johannes Weiner wrote: > [...] > > > But I don't think an anon/file bias will capture this coefficient? > > > > It essentially provides the userspace proactive reclaimer an ability > > to define its own reclaim policy by adding an argument to specify > > which type of pages to reclaim via memory.reclaim. > > I am not sure the swappiness is really a proper interface for that. > Historically this tunable has changed behavior several times and the > reclaim algorithm is free to ignore it completely in many cases. If you > want to build a userspace reclaim policy, then it really has to have a > predictable and stable behavior. That would mean that the semantic would > have to be much stronger than the global vm_swappiness. I agree. As what I replied to Roman's comments earlier, it is cleaner to just specify the type of pages to reclaim. > -- > Michal Hocko > SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Xu Subject: Re: [RFC] Add swappiness argument to memory.reclaim Date: Thu, 19 May 2022 08:29:32 -0700 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TTppzXqGXGzezJ0VNR/10YUamTL+Jpn/a+OS4nEwUs0=; b=aJRufbeVPWWTg6xesgVQ92jTkUBXkj4204NtsTRRuXhSDjPb8Xkpo0bNaK4046hFnv mLKgwhvsh9GAmI2LFDkeF6HnSFJOYseaJ+p8tes7OyljSbloK0G+33o31Bpt84fkfCb4 J38wGhcIGfbVqDVaOHU/qKlZO1PRo09oJVwe8Kq8Gjr8j7VY4qHpf1GeZdyugHi00mzw aPj5qp0lnQNuRwPUHk0H544OPn69tIDaGuwVRtFJw5cVWxmIclVYYJ1OVG+xA+X0wkh6 EFpAbJrZNyvmy90Vgh11onsTrIn9w5C0EYbSgXGfpC4kZqk73crIwyt6vZPv3EiDdghA AwgQ== In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Hocko Cc: Johannes Weiner , Yosry Ahmed , Shakeel Butt , Andrew Morton , David Rientjes , Roman Gushchin , Cgroups , Tejun Heo , Linux-MM , Yu Zhao , Greg Thelen , Chen Wandun On Thu, May 19, 2022 at 1:51 AM Michal Hocko wrote: > > On Wed 18-05-22 22:44:13, Wei Xu wrote: > > On Tue, May 17, 2022 at 1:06 PM Johannes Weiner wrote: > [...] > > > But I don't think an anon/file bias will capture this coefficient? > > > > It essentially provides the userspace proactive reclaimer an ability > > to define its own reclaim policy by adding an argument to specify > > which type of pages to reclaim via memory.reclaim. > > I am not sure the swappiness is really a proper interface for that. > Historically this tunable has changed behavior several times and the > reclaim algorithm is free to ignore it completely in many cases. If you > want to build a userspace reclaim policy, then it really has to have a > predictable and stable behavior. That would mean that the semantic would > have to be much stronger than the global vm_swappiness. I agree. As what I replied to Roman's comments earlier, it is cleaner to just specify the type of pages to reclaim. > -- > Michal Hocko > SUSE Labs