From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH RESEND net-next 1/2] net-memcg: Scopify the indicators of sockmem pressure Date: Tue, 11 Jul 2023 20:45:37 -0700 Message-ID: <20230711204537.04cb1124@kernel.org> References: <20230711124157.97169-1-wuyun.abel@bytedance.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: 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== In-Reply-To: <20230711124157.97169-1-wuyun.abel-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" 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 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?