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 7A312C43334 for ; Thu, 23 Jun 2022 16:42:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15BA28E0162; Thu, 23 Jun 2022 12:42:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 110438E0144; Thu, 23 Jun 2022 12:42:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3D748E0162; Thu, 23 Jun 2022 12:42:56 -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 E4BF28E0144 for ; Thu, 23 Jun 2022 12:42:56 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B8D6E20A91 for ; Thu, 23 Jun 2022 16:42:56 +0000 (UTC) X-FDA: 79610069952.02.D677E93 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf23.hostedemail.com (Postfix) with ESMTP id 68070140012 for ; Thu, 23 Jun 2022 16:42:56 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id x1-20020a17090abc8100b001ec7f8a51f5so3183331pjr.0 for ; Thu, 23 Jun 2022 09:42:56 -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=UM34rLftBEFITfd1q0ztjpAN3WImbjMZCMHyoY7P7EAk7ja3mf/w75gLr2zPyZ5T8Y rYC47JQoYgm6p9iIECY9X1dyJEpLnACM5jTuhAMFiBysdiroNpWnQpKFoKG+crHCD6n+ KespkXbO+KG7TsXKqV8N9G5+re6Fp9fwenQqcn+LdzBU4g+2tnjMe04W1eEqKmAq6rf8 2q/Fmiebfar/ytCJ557UkLtCb81Zb4R1Q+o/GwpoY40GeSaUQik41L8qW381AkH8VKPe ua9JTMT12pCQShKD8zwmLEltqdr/65opVe5VGyioT+4o7kFHbr1JFpIHCch4y1UKukGf 40QQ== X-Gm-Message-State: AJIora9AzeG12Hrkd02mu4XZF0leN8S7k2Tfp6v/EsKo95Sdw8PgUScJ gB/9B66K45YHh/Yss5zycCGd6CJ7mIhiAYFKMMBOuQ== X-Google-Smtp-Source: AGRyM1tIkL+FeUm4IWfsd5tVJ0yduL2FFqQQW4NwI9yBKuUe8peXkhFsv/YnlRQe9BGM49zGFj3XXDX46gMWXqEYh4o= 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" ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=d0K9ZioX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf23.hostedemail.com: domain of shakeelb@google.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=shakeelb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656002576; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=S6hz8M8YZFqPg+rrGciN8Bxo8th0Vg1fhfElGS1vnuI=; b=WHgYQFBc4XwUZyoABGWd4H26Ibs/BDLYBkukmO7CzXxRwwZ94+Nex9jFSFlKUe6+3GJyi1 KnkjvBb6lnODSrRNV+rRBjWJvtz1W4ROow2qJ6xvwHYKeIezBUetDC6GxHLATWkRGozHgp OL1/wesB72m5YMqiGrJgp40UvVRXFE8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656002576; a=rsa-sha256; cv=none; b=K1Rc5es5eLuwKOS+QYlP1Ug1wy0p2kljg76+WBDAyil7G1tNumCPbvIt7p4jlU0+oDQtw+ IJGRdYdNtkqZqMHV/I69cvnVd52V5G1IJmdcdqQ3NP/PPHBk+C7MtVOYMs0cvyXdPeuhSa 41nxwVXfC4u9M9m61FLIEwg3BKlvbco= X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=d0K9ZioX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf23.hostedemail.com: domain of shakeelb@google.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=shakeelb@google.com X-Stat-Signature: rg1xntkcexyztbcmzmao7ukygxx3nxco X-Rspamd-Queue-Id: 68070140012 X-Rspamd-Server: rspam12 X-HE-Tag: 1656002576-909785 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, 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.