From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH] mm: vmpressure: don't count userspace-induced reclaim as memory pressure Date: Mon, 27 Jun 2022 14:31:27 +0200 Message-ID: References: Mime-Version: 1.0 Return-path: 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= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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