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 C9683C43334 for ; Mon, 27 Jun 2022 12:31:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 615006B0073; Mon, 27 Jun 2022 08:31:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C6418E0002; Mon, 27 Jun 2022 08:31:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48D648E0001; Mon, 27 Jun 2022 08:31:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3909F6B0073 for ; Mon, 27 Jun 2022 08:31:30 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 14E43F8B for ; Mon, 27 Jun 2022 12:31:30 +0000 (UTC) X-FDA: 79623951540.07.FF096CA Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id 6E46816002D for ; Mon, 27 Jun 2022 12:31:29 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 23B0F21CE4; Mon, 27 Jun 2022 12:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1656333088; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H2x18KoFRy5eal2D3ylc2+U1rybp7813ga/wOUoNe6s=; b=MN+FbeFBztRg1vQn/aZS6WgzpJcvWE6GlhrAy1Bn2uYz6Fgk3nG1G2IBxSamszzE041LHN FYiV/4Oov7dyHxK7Ap2HTWMY4KowzOrjMf2zZGO5NgGZfnmfaD9ie3tBC7hiO/8eBkBjto EEejyW10KiaUFmPLEkSEZ9i8fEwxLpw= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 87FAA2C141; Mon, 27 Jun 2022 12:31:27 +0000 (UTC) Date: Mon, 27 Jun 2022 14:31:27 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Shakeel Butt , 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 Subject: Re: [PATCH] mm: vmpressure: don't count userspace-induced reclaim as memory pressure Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656333089; 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=H2x18KoFRy5eal2D3ylc2+U1rybp7813ga/wOUoNe6s=; b=ea14hEyDTq4osJT0hCWKDH3zI+2Ngaq42dnfaQ0zY+7ejucXWNvNe5j5/YiNHxpWiDF3ed RaAC8XsNU6Si3WMKJjK45kg8PhqwWl8Y9rBXTc7BypEhYhue5S/ak7zL7Ypx3dOytxhIVr 3iDRYU5U2VCDLc5YqMMQEjPxHiNrnXI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656333089; a=rsa-sha256; cv=none; b=No8SgSwqu+4xax8gEX4DxG4lPwy/UWyXr7hRjdzUKuZdmdyxtKIm7m/aQCAcn/Dz1wPwhr O//I1YeaKeWbNs8tsYFTjkoxt0tr5l/nuP7RAZF49tOE32Sovpaa3lr3UobfmJUOxqQVFI CWY5XVbBchNQl944nt/gU/T4MX8EzSk= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=MN+FbeFB; spf=pass (imf08.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=MN+FbeFB; spf=pass (imf08.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6E46816002D X-Stat-Signature: zxuzspass7g8y8tp3bpndudpskarxot1 X-HE-Tag: 1656333089-459536 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 Mon 27-06-22 02:39:49, Yosry Ahmed wrote: [...] > (a) Do not count vmpressure for mem_cgroup_resize_max() and > mem_cgroup_force_empty() in v1. yes, unless you have a very good reason to change that. E.g. this has been buggy and we have finally understood that. But I do not see any indications so far. > (b) Do not count vmpressure (consequently, > mem_cgroup_under_socket_pressure()) in v2 where psi is not counted > (writing to memory.max, memory.high, and memory.reclaim). I can see clear arguments for memory.reclaim opt out for vmpressure because we have established that this is not a measure to express a memory pressure on the cgroup. Max/High are less clear to me, TBH. I do understand reasoning for PSI exclusion because considering the calling process to be stalled and non-productive is misleading. It just does its work so in a way it is a productive time in the end. For the vmpressure, which measures how hard/easy it is to reclaim memory why this should special for this particular reclaim? Again, an explanation of the effect on the socket pressure could give a better picture. Say that I somebody reduces the limit (hard/high) and it takes quite some effort to shrink the consumption down. Should the networking layer react to that in any way or should it wait for the active allocation during that process to find that out? -- Michal Hocko SUSE Labs