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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8745EB64D9 for ; Wed, 12 Jul 2023 03:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbjGLDps (ORCPT ); Tue, 11 Jul 2023 23:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231550AbjGLDpl (ORCPT ); Tue, 11 Jul 2023 23:45:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E4BC1717; Tue, 11 Jul 2023 20:45:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BC6B5616DB; 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?