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 77056C433EF for ; Thu, 19 May 2022 18:25:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE65D6B0072; Thu, 19 May 2022 14:25:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C956A6B0073; Thu, 19 May 2022 14:25:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5DFC6B0075; Thu, 19 May 2022 14:25:24 -0400 (EDT) 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 A7D476B0072 for ; Thu, 19 May 2022 14:25:24 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7413A32C98 for ; Thu, 19 May 2022 18:25:24 +0000 (UTC) X-FDA: 79483320168.13.BC85C7E Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by imf09.hostedemail.com (Postfix) with ESMTP id 54DF4140009 for ; Thu, 19 May 2022 18:25:13 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id l38-20020a05600c1d2600b00395b809dfbaso3143512wms.2 for ; Thu, 19 May 2022 11:25:23 -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=CX4W+bGFQtjopHaRz1grkqNNRwJqfo8+CP9Ln5Qv0BI=; b=i4PyrMtkcgGixTlkUSsQqhbDDpwMivPfCTE3sFBvx33wKc5ZVPhd4MJiuGlinz3o0a JJ/0W5wMh06DoDbheCitqY2+PNpKrFWysvgo/4GE7X7EHEocqxttah93EoHfiWvG3IsF MvVcgCGHcdM6gickuEP/50CG5SmyjJg4mJlXy01hvPHg/sI5OMr2fDIt6sicDaxMRE5p QKOobWw2wmJ69028sakpU81K1oL+rh3nzvGM1vPOJEgaL8VRbayUBgKUhTRGkwTavWcM bjdlrRUdMTSYJaMBTudbEsRYiWwIXuIKwyrMYtIrDRPiQuwpdHkyWkkwedKAAW2WgpXu VcPw== 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=CX4W+bGFQtjopHaRz1grkqNNRwJqfo8+CP9Ln5Qv0BI=; b=mglZC8uBTBicDUnmznVTZWf+X0I/g8zF7HucikfbZB0vZ0sNPNQDmx212AZ3h1TOLp YWL29JO0A5akPA0qhCOmdXtRe5Vwg9cm/qk9b7eNpo/Yr6zUtC1LzwO4kn0FnQlSwy08 A9kSHRAyy9ywSWdAFIA3PMnO+PxdYaqXfRu+3teWZkCAFihXv6PMf7dWGIno4zVDQa84 puB5KtUIyMg/wx8IP6VnfMDJrmWMMCcqEU5FD3JviOmQIxZLgmcIMKfuMJzoaGNgUJw4 pRVtXBpB3fUD2Oikysg7Qha9ZLtwA2bOpu5Mn5YE07JrlnY3mXtIx5BgpvztEAZ7+2fw vWEg== X-Gm-Message-State: AOAM530xYZRZKnoy7e+eGQwsEtH4OiFWmcE0xTFqCrxc9OSkT0zg4FJw lZ7qIJKt//Di8FbJcmLCn1U10UcjMIzkOcgNLKrozw== X-Google-Smtp-Source: ABdhPJz+fWL+9uC7FIeCCD2oIEFyp0ACaf6DWTwErmon2KdTz97T6qHOY4OdXauBwGED2CsgOrGNNeVLbADh/nmIa3I= X-Received: by 2002:a05:600c:1910:b0:394:8517:496e with SMTP id j16-20020a05600c191000b003948517496emr5019782wmq.24.1652984722564; Thu, 19 May 2022 11:25:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yosry Ahmed Date: Thu, 19 May 2022 11:24:46 -0700 Message-ID: Subject: Re: [RFC] Add swappiness argument to memory.reclaim To: Michal Hocko Cc: Wei Xu , Johannes Weiner , 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-Stat-Signature: 5ntwnnz3zig8sa3rtjbkdn7zp4kyzqy9 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=i4PyrMtk; spf=pass (imf09.hostedemail.com: domain of yosryahmed@google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=yosryahmed@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 54DF4140009 X-HE-Tag: 1652984713-31535 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. Agreed as well. I will work on an interface similar to what Roman suggested (type=file/anon/slab). Thanks everyone for participating in this discussion! > -- > Michal Hocko > SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosry Ahmed Subject: Re: [RFC] Add swappiness argument to memory.reclaim Date: Thu, 19 May 2022 11:24:46 -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=CX4W+bGFQtjopHaRz1grkqNNRwJqfo8+CP9Ln5Qv0BI=; b=i4PyrMtkcgGixTlkUSsQqhbDDpwMivPfCTE3sFBvx33wKc5ZVPhd4MJiuGlinz3o0a JJ/0W5wMh06DoDbheCitqY2+PNpKrFWysvgo/4GE7X7EHEocqxttah93EoHfiWvG3IsF MvVcgCGHcdM6gickuEP/50CG5SmyjJg4mJlXy01hvPHg/sI5OMr2fDIt6sicDaxMRE5p QKOobWw2wmJ69028sakpU81K1oL+rh3nzvGM1vPOJEgaL8VRbayUBgKUhTRGkwTavWcM bjdlrRUdMTSYJaMBTudbEsRYiWwIXuIKwyrMYtIrDRPiQuwpdHkyWkkwedKAAW2WgpXu VcPw== In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Hocko Cc: Wei Xu , Johannes Weiner , 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. Agreed as well. I will work on an interface similar to what Roman suggested (type=file/anon/slab). Thanks everyone for participating in this discussion! > -- > Michal Hocko > SUSE Labs