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 098AAC433EF for ; Thu, 10 Mar 2022 17:25:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A8E28D0002; Thu, 10 Mar 2022 12:25:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 730608D0001; Thu, 10 Mar 2022 12:25:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D2B88D0002; Thu, 10 Mar 2022 12:25:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id 4BC7F8D0001 for ; Thu, 10 Mar 2022 12:25:34 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 032168249980 for ; Thu, 10 Mar 2022 17:25:34 +0000 (UTC) X-FDA: 79229153388.26.B3E9D87 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by imf26.hostedemail.com (Postfix) with ESMTP id 28BCC140019 for ; Thu, 10 Mar 2022 17:25:33 +0000 (UTC) Received: by mail-pg1-f169.google.com with SMTP id o23so5250254pgk.13 for ; Thu, 10 Mar 2022 09:25:32 -0800 (PST) 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=4GbOr1uioQltPIPVMqRnZHQKr8EDYMkWgrg8SIDQ0c0=; b=PQr32amwCD87MwpGj44VG8EvIHs+CIcmDHlLPFDYL4spS/A9ezqW6fNwBYNhKo/JUO sm37F5298oesuaK4VJRCU5EYY16qAogKyEdTgjWrOGmre6/gp8ON2AbcgHS+oODA3BWW VoXXDOSdzpgSH0QK08hMt9wI/KkZiXsmMWblhEFobdnXbLEYiBCtOHJzNho7pEqFs8g9 pz86vunHstqR0Bu0p6Os1CHoQ2yAugUvVbh9YI4TYk1kRpUCal+j2RtC8bJZlQU7mglJ Yy4OM2l9PRkbVoz26Tw5puqNKm0XBbp3sE6xKJsS5AD8x1y5s1jO8qRi+2RJjTk7ChXg POmA== 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=4GbOr1uioQltPIPVMqRnZHQKr8EDYMkWgrg8SIDQ0c0=; b=5QMTcCzY4Mhd4apgtNKYcg9d6ni7V8iVkxRm9uiWyRxDeEdoYJ67mxy3UFHVJjTx/H IGOrwyQ3nB+czvsNY0jm9NyMhtOSPr/lNy+l6M6KBwSspLiFcUYPJHIlrluuYMV7DOZ4 Hv1BOyP5se5AUPXPXz3HEzEToJkNzwm0ZgcIGZccWWms3tjeD5d9vutLKOA9Q0wnq4NU tWPd9AxFqfKOYqNtR7NPz5qtlJLTrUEpc+YmJuZwc9sw8kv2scMxVaVuvXMrkq9tFAT6 9AyjN/6qjo21yxqmtrG9Hq95hv354F2wg10Aj9G6poZS0jDXtvR8HtU/dUth9q/o4G2/ 9a5w== X-Gm-Message-State: AOAM531H8d3wPksChqk6tCtfX20WJbujManiPZoUqW1+/yMddk31Zgub IrbylIBxItm3b6XPEmw1UJatfKxjPeX7joj2Gvw3Yw== X-Google-Smtp-Source: ABdhPJz0/2nd3MoQhcA9zbxYzPQmQYQd4TnACq3kUge1XIehBIj/6FBmG6+vwS6EaLutdWCB7y6YKDwSFqv0HiPOB48= X-Received: by 2002:a05:6a00:a06:b0:4f6:aa23:edaa with SMTP id p6-20020a056a000a0600b004f6aa23edaamr6093763pfh.8.1646933131927; Thu, 10 Mar 2022 09:25:31 -0800 (PST) MIME-Version: 1.0 References: <5df21376-7dd1-bf81-8414-32a73cea45dd@google.com> <20220307183141.npa4627fpbsbgwvv@google.com> <63fcd044-7c87-63f3-391e-3b32f8feaae@google.com> In-Reply-To: From: Shakeel Butt Date: Thu, 10 Mar 2022 09:25:20 -0800 Message-ID: Subject: Re: [RFC] Mechanism to induce memory reclaim To: Johannes Weiner Cc: David Rientjes , Michal Hocko , Andrew Morton , Yu Zhao , Dave Hansen , Linux MM , Yosry Ahmed , Wei Xu , Greg Thelen Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: t3m579b9ytad9s7tfy7shwheo6t789oo Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=PQr32amw; spf=pass (imf26.hostedemail.com: domain of shakeelb@google.com designates 209.85.215.169 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Queue-Id: 28BCC140019 X-HE-Tag: 1646933133-171006 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, Mar 10, 2022 at 8:58 AM Johannes Weiner wrote: > > On Wed, Mar 09, 2022 at 02:03:21PM -0800, David Rientjes wrote: > > On Tue, 8 Mar 2022, Michal Hocko wrote: > > > > > > Let me take a stab at this. The specific reasons why high limit is not a > > > > good interface to implement proactive reclaim: > > > > > > > > 1) It can cause allocations from the target application to get > > > > throttled. > > > > > > > > 2) It leaves a state (high limit) in the kernel which needs to be reset > > > > by the userspace part of proactive reclaimer. > > > > > > > > If I remember correctly, Facebook actually tried to use high limit to > > > > implement the proactive reclaim but due to exactly these limitations [1] > > > > they went the route [2] aligned with this proposal. > > > > > > I do remember we have discussed this in the past. There were proposals > > > for an additional limit to trigger a background reclaim [3] or to add a > > > pressure based memcg knob [4]. For the nr_to_reclaim based interface > > > there were some challenges outlined in that email thread. I do > > > understand that practical experience could have confirmed or diminished > > > those concerns. > > > > > > I am definitely happy to restart those discussion but it would be really > > > great to summarize existing options and why they do not work in > > > practice. It would be also great to mention why concerns about nr_to_reclaim > > > based interface expressed in the past are not standing out anymore wrt. > > > other proposals. > > > > > > > Johannes, since you had pointed out that the current approach used at Meta > > and described in the TMO paper works well in practice and is based on > > prior discussions of memory.reclaim[1], do you have any lingering concerns > > from that 2020 thread? > > I'd be okay with merging the interface proposed in that thread as-is. > Thanks, I will revise the commit message of that patch and send it out again. Also I will try to address Michal's concerns as well. Shakeel