From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2D0D80E for ; Wed, 12 Jul 2023 03:45:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36885C433C8; Wed, 12 Jul 2023 03:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689133539; bh=kV1aAg4a4cV9uuw2PocMUWykoJKk/tyIh0MW/t13PJs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GD62fC1aPLT4Chb4Q2u79JyVL01BCjTdBo6PhaMSEQghTJVJ2XMfb8K4IA+5zMHhm Jw5/r04qhJG3aBR8GiU4bqed0fsjfTvIcbfb6yTVO/VaN9jYHTc9bLnaqE6xisBuL2 DFlYzM4h3GDQcPSUU8/iQpd3F3709bWbKmrIjdADvjUlCi170bJr8v5f93PdOLp2wg nARXUSE+et76TRzo+W1gxu3XwSJZf7jgKK72NG0sQ02KHSbo3GZ+nPTpLCh6eWNMR1 38TqTfOPM7T4rqJJpU4+HxdOul3kyGc7D8rFNUpml/fi7eSw5LpV8FvkUIEcjwXB8S 4b6xx+Y7a3Kvw== Date: Tue, 11 Jul 2023 20:45:37 -0700 From: Jakub Kicinski To: Abel Wu Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , David Ahern , Yosry Ahmed , "Matthew Wilcox (Oracle)" , Yu Zhao , Kefeng Wang , Yafang Shao , Kuniyuki Iwashima , Martin KaFai Lau , Alexander Mikhalitsyn , Breno Leitao , David Howells , Jason Xing , Xin Long , Michal Hocko , Alexei Starovoitov , linux-kernel@vger.kernel.org (open list), netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), cgroups@vger.kernel.org (open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)), linux-mm@kvack.org (open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)) Subject: Re: [PATCH RESEND net-next 1/2] net-memcg: Scopify the indicators of sockmem pressure Message-ID: <20230711204537.04cb1124@kernel.org> In-Reply-To: <20230711124157.97169-1-wuyun.abel@bytedance.com> References: <20230711124157.97169-1-wuyun.abel@bytedance.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 11 Jul 2023 20:41:43 +0800 Abel Wu wrote: > Now there are two indicators of socket memory pressure sit inside > struct mem_cgroup, socket_pressure and tcpmem_pressure. > > When in legacy mode aka. cgroupv1, the socket memory is charged > into a separate counter memcg->tcpmem rather than ->memory, so > the reclaim pressure of the memcg has nothing to do with socket's > pressure at all. While for default mode, the ->tcpmem is simply > not used. > > So {socket,tcpmem}_pressure are only used in default/legacy mode > respectively. This patch fixes the pieces of code that make mixed > use of both. Eric Dumazet is currently AFK, can we wait for him to return (in about a week) before merging?