Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9256960rwp; Thu, 20 Jul 2023 01:56:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFfxn6gR1YGIG92XTfTgRnXs8GS2/SNdgZC8k+ZsifNxcG6yQ9dqFlZ11rH/EXclc4HKvcS X-Received: by 2002:a05:6402:332:b0:51d:9ec4:9616 with SMTP id q18-20020a056402033200b0051d9ec49616mr4163375edw.28.1689843413708; Thu, 20 Jul 2023 01:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689843413; cv=none; d=google.com; s=arc-20160816; b=YAbXAt4xGsKwnzIeHjGKzmCOKFwbAzrqxFVo4+R4xypSyvW7JzHdAZ0BuVt67kSwGU hczN4aj/m79FunB/MyZyjzwVFNXW/Lw8ajutCZu3Y6ahwfi8ZY5x8BliDvZb+RvPVzGB ur6gTp3IXZM47ywin/Srhr3D5xDivbRRayFYAnxyBzPwLLARcIqPBYo/+UnKNQObiNmi c76jGN5Uq+MDLeMTwnVlrghQF4z3IIQBgW2HPLofthgSDRtIqRXaMzL+7GSp+FQXYtD9 YdpmzA8Z19eJeIxmNIFMZw2OAu6mI0cuR2IP9kzrVCB7/5hIMFJXHIDjoY24VlClmAJ1 i9fg== 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=QCBG10jWmv8n11PUl1At+mRhQs+STyCHC9Y8ykk98hs=; fh=2ehvjd3VHJ0EA+dO3II38Pi05Ktnbwj2lbPQ0yrxCag=; b=O/DRTbQ61GmTB4DpHWvv5+WgbLsqQQ0ZmiQP/pReG/F0WCpG72y3K1PU170xzKZ0Wo ikrfSVEfxfoOcTtA17nHsbRvzvcQTn3C17z7dB6z7q8xzge0xWrtRx4l1PnD6Vg1zukO VBeHszTTMJsAWtg163VyP9CImCaqdXqDB+cTL9RizDgwuWEOwT9JPodMwgUp02mFy6O9 p7oa6pj7W/G/IN15xszRj60CD2ghvzH7Bn2xB5Q2oi4exjhZHMUYKbbQZDqvfx9GQ61p TdTn1icrWifF9xr/9Djl0jakFC09puRUabAjRyVAVFdFkwYq5pbT3hVl6ceiSWAQBsxc f3GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Nnu9yXWn; 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 u25-20020aa7d899000000b0051e162ffa28si474957edq.691.2023.07.20.01.56.29; Thu, 20 Jul 2023 01:56:53 -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=Nnu9yXWn; 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 S230417AbjGTH7c (ORCPT + 99 others); Thu, 20 Jul 2023 03:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbjGTH7a (ORCPT ); Thu, 20 Jul 2023 03:59:30 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E7C1269D for ; Thu, 20 Jul 2023 00:59:04 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-666eef03ebdso285451b3a.1 for ; Thu, 20 Jul 2023 00:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1689839944; x=1690444744; 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=QCBG10jWmv8n11PUl1At+mRhQs+STyCHC9Y8ykk98hs=; b=Nnu9yXWnT11QAdbQ9GUhYKZSFFcUk0bsZdtUNqUMHxBWMFa6402Ny2yH5iQxEZhGtt Kz3XRv01VgrqlGSpLQm7E8BKzJTbIbnZkymzLZbp9YmpoHsQYwRejn13SBbT7IrQTO6U SSKMw0RKNd+ruoF1X7gd4bGzDUdn3VZamns/FpVKcyZVE8bZfh3ZB7SkwGWidjmpWE2S z1eYV6E/QnugvkY/taUn0a53MkAB3OHG65tL3psRnBqx/L04+GCvHT8xrBnv01/ZpdL0 kXwHSiBUs/WAYR8ArUnjYyaQ6W/MAMWTQXpvjgTEogO5unsJNpTbyHBzDOtgtGFpgt0g Sp/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689839944; x=1690444744; 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=QCBG10jWmv8n11PUl1At+mRhQs+STyCHC9Y8ykk98hs=; b=Zowd4zXi0TG10oTORFgwGA77Nw54g4ZHHyNNC7lF3Lwltiqz36pXhLhb4Wq6WNfOv7 CHaPT/wTu9xlQijDpn7qwp7aqkVttjDam325Aj1g3jT8FWwYqUbq3dgnlvKrt1YopTdB v+/IMyS92H0iS5dVnPKugJVxZJ9nAkY6Awh8iUk1p/X0v1OM/o02XlylEyVMQc0LYQ4P q+d9RrYDwSvP0l694fnwGYUhcFnLzoXstKWzTT3UbCnaX2CKsb1a8WG2eGE8SlRqAdJt 6RaecXIOfMOaQ5pRH/wr84HHELFYOQrftEzm25NlQyx1ME+1aftZDnpz46+Z0yuIehnq Xyqg== X-Gm-Message-State: ABy/qLYe8jx0zotpLvVg9/CdCIbKpNoXnnb5ODQckN1VZyHMbmyGHD6j 1PzkU8W9X/AfFrrfz0izHhZr/g== X-Received: by 2002:a05:6a20:72a4:b0:133:f5c1:57bb with SMTP id o36-20020a056a2072a400b00133f5c157bbmr17999503pzk.20.1689839943740; Thu, 20 Jul 2023 00:59:03 -0700 (PDT) Received: from [10.4.72.29] ([139.177.225.238]) by smtp.gmail.com with ESMTPSA id c1-20020a170902d48100b001b895a17429sm579947plg.280.2023.07.20.00.58.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jul 2023 00:59:03 -0700 (PDT) Message-ID: Date: Thu, 20 Jul 2023 15:58:49 +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: [PATCH RESEND net-next 1/2] net-memcg: Scopify the indicators of sockmem pressure To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , 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 Cc: 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> Content-Language: en-US From: Abel Wu In-Reply-To: <20230711124157.97169-1-wuyun.abel@bytedance.com> 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_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Gentle ping :) On 7/11/23 8:41 PM, 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. > > Signed-off-by: Abel Wu > --- > include/linux/memcontrol.h | 4 ++-- > mm/vmpressure.c | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) >