Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37948148rwd; Wed, 12 Jul 2023 00:25:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0K4Of+Fuk+BQW3EmYDCmRoaAl9XCR47zSQkHeISfsMr3mr8bFtvu38twIe3Qdx6hw9ss4 X-Received: by 2002:a2e:9a87:0:b0:2b6:df15:f6c3 with SMTP id p7-20020a2e9a87000000b002b6df15f6c3mr14908592lji.39.1689146739722; Wed, 12 Jul 2023 00:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689146739; cv=none; d=google.com; s=arc-20160816; b=Bahcn2ZxlinaSkkGofoNKkbA/CFzOBZzFQMsP0S4MPp3B6XeZsPebPPuGnf+V7IGsn eaV2tftykLzRYlaBL1OcnuqyO2lnNlWUsaXmhcCsZTJEaHnXqtRfKenDprpt+wyvHGcO zRFiI56DA7upT+Dvlt4QqeZXlIChbAOywmkEA/bPrQ9Gzy+/Pd7upYvK4DTWh16+l2AW OqiOqG3bfXOZBrpDm3fC3JP6D8lotwPLGJzaOAtfvLVlkrnKoZK8GhWgwWRFAuVMgUpS csPW14bFvG9TVxu15UqaRgvqmsDTttSF/haSt7Kj89Av/pZqJlEaf0yEDYF0h+yVcvxs ezVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=y8WhpdF8/RW8zGFH/BZgsqEuwmUxTSnkz6bmGMUpKLg=; fh=8dN8bmLKm6ToWUfQfbeTbZS0uYR2dSOKx/JPl3FNHME=; b=HuY2r36/EupR9XFCLf6jttqxH8ZA6sXIBB22c5qZYyiMFiwSD/p43r008wTa7a6Dg7 bCpdw84+N2rssk8aLCvY2qhZI+2p4owTebFp0BxgN+Fv7VdtGE0mU/Ec2PifwlYooLIQ 1Oo7mXqf77f2v9NF0NU0K431zfEPVrgvgxq05Re8D3vHwBrEkwbdNikZnihOBvN1iEWB BN5LErgxSu9UMp9X7RIyR+qQ/l3+1nwidXNYVFg+G2TgclqlfSdoTByzcSLrst7kf90B LWv3fF5bJMxY6nm5V2zCaVF2ELHj/oqMX9RqkK329zV7uImOgGEVKAHJpy1d+IOFg+Td Zubg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="W/GvKFgl"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g25-20020a1709064e5900b00988939ad0bdsi4056495ejw.321.2023.07.12.00.25.15; Wed, 12 Jul 2023 00:25:39 -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=@bytedance.com header.s=google header.b="W/GvKFgl"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231825AbjGLGqI (ORCPT + 99 others); Wed, 12 Jul 2023 02:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbjGLGqE (ORCPT ); Wed, 12 Jul 2023 02:46:04 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BD7DC for ; Tue, 11 Jul 2023 23:45:38 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-666e5f0d60bso3866484b3a.3 for ; Tue, 11 Jul 2023 23:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1689144338; x=1691736338; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=y8WhpdF8/RW8zGFH/BZgsqEuwmUxTSnkz6bmGMUpKLg=; b=W/GvKFglSlPxZ7GDe3SBJk00S68EMh1nVTwsJAwhPkQ3MT365bsUjoqdqE+/sA7CSN NRbg4zl/wx1Ls0jXTms3+eFHtQJyUHaiDmc3++U9grS799Xvv+6VfZ7rUTRs7OMQTQAB FWp2o073tH2I2V2BGGYkcvq9X9akSwkleCwtv4Cgn9Gl0v/0cXvmNCmhRYQdPENheFEs xGjTHkxJaBaShbI/QBVm5k2nSoBimFca0JrTPTEOBCnwYyet961sXcDsDzRAZpzsM6Db MLVmvFZEDnKOJT+7M+5szD2mCWMufCAeW02SnLCg9kpv0jB3gHFFeTNQKSCl0J7aqjAE 5n8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689144338; x=1691736338; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=y8WhpdF8/RW8zGFH/BZgsqEuwmUxTSnkz6bmGMUpKLg=; b=A2k1wn0XfmRkW20ywXIYp1K7MlDa6/eoCt9XOrZTWsRlIVD7qXaTMfFFo8MgtQcMOI QEjvyz7JHGWPA/WRs2Ar50UuX1CpzwSwSKwu/0OnE4dQBTRKqMhUcKyWrIwvhZv1W3Bo oNyFPGfHwMLoxcRSmV3LKj5FXYV3GqJUexgYOuU674WBk1AHh9/50vwpxcYSlCvblw4O K3r24pmDUg9VCy7mfIhtMjO/TQwt8thWvVO5Mk/hAH+jYQXZVSRxjTSQ7ga+FgmoxS1f hA55iiz6mhW3sc3CVkbvNzvYnja2sY1bUrn8EjXmQqcTkkKRjqDErf9AJXCwKTpAVUh0 BMsw== X-Gm-Message-State: ABy/qLYLHIC+lMbo/mbuEnfK00GNLDc25Cfu+VgvMjHN22m8V0Fp8g5b QfcQYH/Myoa53TPhpfc7DQReRA== X-Received: by 2002:a05:6a20:7f94:b0:12f:dc60:2b9e with SMTP id d20-20020a056a207f9400b0012fdc602b9emr17247332pzj.48.1689144338323; Tue, 11 Jul 2023 23:45:38 -0700 (PDT) Received: from [10.94.58.170] ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id c11-20020a170902cb0b00b001aaf2e8b1eesm3085131ply.248.2023.07.11.23.45.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jul 2023 23:45:36 -0700 (PDT) Message-ID: <987f7855-8b1e-ad1a-29d3-8511ccaa00b2@bytedance.com> Date: Wed, 12 Jul 2023 14:45:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Re: [PATCH RESEND net-next 1/2] net-memcg: Scopify the indicators of sockmem pressure To: Jakub Kicinski 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 , open list , "open list:NETWORKING [GENERAL]" , "open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)" , "open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)" References: <20230711124157.97169-1-wuyun.abel@bytedance.com> <20230711204537.04cb1124@kernel.org> Content-Language: en-US From: Abel Wu In-Reply-To: <20230711204537.04cb1124@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Hi Jakub, On 7/12/23 11:45 AM, Jakub Kicinski wrote: > 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? Sure, thanks for providing this information! Best Regards, Abel