Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6024854iog; Thu, 23 Jun 2022 09:47:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKxp7wWK+lm74DpeUkBUX71G7pDv3f5x6y76u3N6K2gEzGXfMDjDLg9/AY8FixlL9wUo6D X-Received: by 2002:a17:90a:8b8c:b0:1ec:711e:c426 with SMTP id z12-20020a17090a8b8c00b001ec711ec426mr4747487pjn.17.1656002865219; Thu, 23 Jun 2022 09:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656002865; cv=none; d=google.com; s=arc-20160816; b=eUEkxD2zNzhXfcEWf7ZNOHQT+/mH/jO10dFIQKU/DYbeyFpQy2/6vCvgN9GPbvtCIe KkYgdyUl3uUk04SzqKg/PwaCr/rLrwO6JoJYiLnxt1eytljbCKhJBb8T76vpgV8EJgVE JbHYFnmeDNbOPdhiT3Z0aphkp166GrF1e+2QMgu003atDSfS7iX7Ys2c3mJG0qi8gdFu nHzwnbyOLmorHjqKWeh+QNCx3ovNyQP/+rI7Zos4eWkGcmNXvjpRajP0xJJ0oBhmUZU+ 71KYJwCpwzC7myK2FR3i/roK0AnTlpqnQQ8x9Va0N6Sdt2m+YlqTS9fbkYKYKV0CQgNv Fw0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=S6hz8M8YZFqPg+rrGciN8Bxo8th0Vg1fhfElGS1vnuI=; b=S0k+tD2ipvyLhTSeWQ2Fnr+1HeqW8JSY9J91La/HE3Ek/q5E6ngAKDBBefzZV8c7UN rdDBn3OxtnpgFij5GlJAV7MtQrzxs+TSbMSyAUnsjciK+zdL0LSci/CiA9rDwh+j9P4K saQGnqOrDErfpS1znqrI9ynxb76KWyqZnbwu5zoGPJnRnmlKn+TBVmOy/IbdsU4Zg1wd Zugwmr/YD1MpWWd/0r5xl36LKRLQ/pAmmLvlYoD4loNodNT6hjC/MdlSlIVoDHJ/K+RW HAn+Hihh9jFo4pa+BWZvhVN0oi1aB+9FAX6m934KQYC0Z/72qYwhQq9kleRkYuxKcZoF yoWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=d0K9ZioX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020aa79147000000b0051c2a82c448si24864274pfi.303.2022.06.23.09.47.32; Thu, 23 Jun 2022 09:47:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=d0K9ZioX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232298AbiFWQnK (ORCPT + 99 others); Thu, 23 Jun 2022 12:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232404AbiFWQm5 (ORCPT ); Thu, 23 Jun 2022 12:42:57 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE56BB96 for ; Thu, 23 Jun 2022 09:42:55 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id r1so18618750plo.10 for ; Thu, 23 Jun 2022 09:42:55 -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=S6hz8M8YZFqPg+rrGciN8Bxo8th0Vg1fhfElGS1vnuI=; b=d0K9ZioXVT08tRoikYi6GqBEGr4BS/wf+DoeVBqJLLTdCIAWr2FXnOm1S10GPbwYnM jrKEFElgWZVEh9MFxB04cMQUnbFUjkYQF6r3Et+6GwNx4sd5TBWgPLocKlQVjWZCRrB2 ARU20yfQHyYNbhYUYT2fRgUV0lQ7hAEbQm5Ecu28CgITIPYzepsNEyC3MQT7q4lzyOMG BEb4FpUhSQqobA9Pob8eUcmRKpHq4Ba+ObD0fZeq4cfioNCAyrTlL4Kk4vln7x4X3x3m v9Qe2nr8fIcROwb84JZkX3RO0rTyNxbolLnY4WvgiXdA9lJ95b7oDT7ySZKqmCCazPDA 3LVg== 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=S6hz8M8YZFqPg+rrGciN8Bxo8th0Vg1fhfElGS1vnuI=; b=iNPN17QIDGxSPMm0l60DEsJBeumSU+YAJzM77NzRJdM4YRxLqC+qG7hPquKnrXh5tS f2cm0KKXIwNxyJoCoo/iRm0ew5S30lZS/KNIL8O/XXMbH5NLPC9unyfzg5DamGlWqAO4 nrMbrwam7FPEHfFktsuyQlpQVX/Rii7fX5QVfCeWpFhSL7YmzYLARBBhPP5AZs+84xvK Xkm/SxgKrEhx3xK5wJTmD+YaS3djxkmcSW5TuD1TlPd+0rBZRfSwS7yzfPOrIWM+hIHD TKgFbIH6SVmrRNMFGFS1Xjx0iCSNl0rOPMeDOUOlcvPJ8ivdqYigWOs8q4x8hyl6L3/s Emyg== X-Gm-Message-State: AJIora80pNVMhLtpSU25hTSbq5FVap2RhvYndh9uoUeUpSNHTHDSobQp T9g+ap+WWEO0Plqef1w/sPWmdzpRuxRa1KvDodpQ1Q== X-Received: by 2002:a17:903:2cb:b0:14f:4fb6:2fb0 with SMTP id s11-20020a17090302cb00b0014f4fb62fb0mr39330727plk.172.1656002575066; Thu, 23 Jun 2022 09:42:55 -0700 (PDT) MIME-Version: 1.0 References: <20220623000530.1194226-1-yosryahmed@google.com> In-Reply-To: From: Shakeel Butt Date: Thu, 23 Jun 2022 09:42:43 -0700 Message-ID: Subject: Re: [PATCH] mm: vmpressure: don't count userspace-induced reclaim as memory pressure To: Michal Hocko Cc: Yosry Ahmed , Johannes Weiner , Roman Gushchin , Muchun Song , Andrew Morton , Matthew Wilcox , Vlastimil Babka , David Hildenbrand , Miaohe Lin , NeilBrown , Alistair Popple , Suren Baghdasaryan , Peter Xu , Linux Kernel Mailing List , Cgroups , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2022 at 9:37 AM Michal Hocko wrote: > > On Thu 23-06-22 09:22:35, Yosry Ahmed wrote: > > On Thu, Jun 23, 2022 at 2:43 AM Michal Hocko wrote: > > > > > > On Thu 23-06-22 01:35:59, Yosry Ahmed wrote: > [...] > > > > In our internal version of memory.reclaim that we recently upstreamed, > > > > we do not account vmpressure during proactive reclaim (similar to how > > > > psi is handled upstream). We want to make sure this behavior also > > > > exists in the upstream version so that consolidating them does not > > > > break our users who rely on vmpressure and will start seeing increased > > > > pressure due to proactive reclaim. > > > > > > These are good reasons to have this patch in your tree. But why is this > > > patch benefitial for the upstream kernel? It clearly adds some code and > > > some special casing which will add a maintenance overhead. > > > > It is not just Google, any existing vmpressure users will start seeing > > false pressure notifications with memory.reclaim. The main goal of the > > patch is to make sure memory.reclaim does not break pre-existing users > > of vmpressure, and doing it in a way that is consistent with psi makes > > sense. > > memory.reclaim is v2 only feature which doesn't have vmpressure > interface. So I do not see how pre-existing users of the upstream kernel > can see any breakage. > Please note that vmpressure is still being used in v2 by the networking layer (see mem_cgroup_under_socket_pressure()) for detecting memory pressure. Though IMO we should deprecate vmpressure altogether.