Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37817021rwd; Tue, 11 Jul 2023 21:31:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFgQobEa8kp0jEyUYl3K9cezyK+obyNEkTUYYRqyMkyo0xxNnibADWTNkUAcXhgK1DAxUJ6 X-Received: by 2002:a05:620a:b5a:b0:75e:da13:544b with SMTP id x26-20020a05620a0b5a00b0075eda13544bmr15909779qkg.3.1689136274966; Tue, 11 Jul 2023 21:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689136274; cv=none; d=google.com; s=arc-20160816; b=KHSeLJY0HdX/QS1T+HBKJagBba+mJKeAL1DmraCc6NSCS5qyrJffPYD5eSLlakzLCK qpd3Y7QAD4pMbGRhFiAeePNHtGNx1HQ+FIiTgWfCXPZBJQmtk8qBWRVARVw8Lggo7p1s sCzAuN1bWxpsggIqvLdw6PkAP52tE/ZjQZSY6Gd7fKVGC7okSEpOsAfOVOYdBt236nA3 4oq1wW1Sb3iRaBdrtYoEl6/A1kci6bwjYRxw8F/4wXsUaHXJNK3Ret8QXbNROOv1kZhF mQhdPfvXDlmcdXsV1Kl56suTDlwkaTYfme33nv42uBxMNlvbz7xpUQdvTDXoGjEEwcRA yrtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=uKdTG34u5sxrIlLERlJ62Pl/zXR/bSIyafqvy2bsPOQ=; fh=gBT4tiXNMhaLPSzYkD9ifo1Pg6u/nYTPWJaPaJGpWBk=; b=xj+1kbUElyi3MX7lJpT4FqRCIaNhhaJUY/STOrSjzOIQlrB6haBvzMwMugq4D67Pbx byF6XGoIYxYuk+8SDKFZuDniHJfGCRKDTObq5RBXdRVQOfsmCjvCNiXHl2POmHbeCQ8s YwNzlXsaeqFQE74F8heJ1wXG8WYR0h8XTIH2vGFyxTYCUcrzk5ScppM1ElOmE6Jw40rW 1x+3eP8jmdqkQcw+MpQ0OP0CWcFj6sCxuaO/apkD+C9PMmouSpn4pXE/w9U/wWzTy08k Rz7ItD2bo7G3KWkh0VDNajZREjauxRmVottcjhGcAy0o3gyALTp9Q9qvYBtFn3DeVGQf 7bgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GD62fC1a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g24-20020a635658000000b0054ff38f6448si2447633pgm.238.2023.07.11.21.31.02; Tue, 11 Jul 2023 21:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GD62fC1a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231578AbjGLDpq (ORCPT + 99 others); Tue, 11 Jul 2023 23:45:46 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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?