Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9296881rwp; Thu, 20 Jul 2023 02:44:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFzP+iPTctI2fzeJU7TrUfohY0syHL5CiPgWHTViDGX6vGX490y4o9E7qFSdCoFCrQyWba4 X-Received: by 2002:a05:6358:789:b0:134:ece4:1e74 with SMTP id n9-20020a056358078900b00134ece41e74mr12231241rwj.21.1689846270203; Thu, 20 Jul 2023 02:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689846270; cv=none; d=google.com; s=arc-20160816; b=HfL8d6JN5ZkeMfsaO2PT7nMEyx/M7vQXw1nBo7KSknj1zB4z6zcyJyO7ANmBkot8zM LUpaDVGabshxxGUqOaffWvpwe7YnsfoOoXQf3YlPNOKSn/SpAO1MxSmkhVPbOpj1c32r Z1Fyp6G4ir7H0MfkIumuKUuav5zIb5RGAmGYBd6UgH1BTPsHuS76SMheg9L4cWHtZ7cZ HkihLF4JmeC4Sfv/SPX0ldPwVWlxtqRavCVHP70LjKJ2QiRfnNoPsGT7S1mZGwCclyG9 Cj4POAFAW0l+GceHE2wb4PRjB8sO1Sk70aaE8ol2dYvQTEFB4CHnR8VBGdnCsi4tx3zL JB8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=k0Q8HK8TX799KwlVsueVU2Vn6pAZBPxCHZbkBqMog0w=; fh=VdTGLt1cSgZHlQQem0puM3XcshWNq4DVyg4H8+xZa0U=; b=X2Bvk8I9V9622uZh17C0MgH8+Rpd1diZHMd6e+zF7HTZUcjKVsCfvKbHWQ3OLjGhrO A9h8cLo1CfJZpqMZvYAyfYeZ5TPG5jpaMdF9DVaeGYByN+X+6DTUEfTH/X0DyHwhATyn tOdC5Y7cv9xgYEoa6AB4rBgnY6ewZpuI2tXMTXuESy5N9iPGJSzCaqipDTykTUUZCjRS VUNVTifBUj2kH5KNujA7V1SQviC5oatHKviimGgt05H2u1JNrOcBepSFyq5NRSKketBG DODkXOcXktjfQaepPihmKF0dU7lGqPfMdyOXgVdSnrhy45UJKuZfhRxERI8+vOKgD20t DP2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=sbu7cKX3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020aa78dce000000b0067b51fca490si577846pfr.248.2023.07.20.02.44.17; Thu, 20 Jul 2023 02:44:30 -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=@google.com header.s=20221208 header.b=sbu7cKX3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230105AbjGTJOh (ORCPT + 99 others); Thu, 20 Jul 2023 05:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232438AbjGTJMe (ORCPT ); Thu, 20 Jul 2023 05:12:34 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849074C39 for ; Thu, 20 Jul 2023 01:58:37 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-401d1d967beso237531cf.0 for ; Thu, 20 Jul 2023 01:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689843455; x=1690448255; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k0Q8HK8TX799KwlVsueVU2Vn6pAZBPxCHZbkBqMog0w=; b=sbu7cKX3RJ4STU+W+JnLifIFmUz7jowp9LlbTrMBKpyqTT6Kt21vKp2H8FzOIS5tep bbXgF86b7ixmUe1C64by8cuyAkXEDJAhk/gJ2VRtUGHb9caKNjgb9OxMQP+zrnCqpcj2 0GriA2TxJI0nFyWsYdarH2tV2F8oXchBWBF49T4hNwMZKqRvLpT7KUAaFpv/hWBlJtnr eR3Q7T3Ih01HzEFFJp1vIMbg3XuP9jk+gC3Voy9dtnPLpZFwxTUCMBTiLlhqEnVZspy9 c7k4pKrsJ+tQo++vjhDeFYDA9oaDf8lz3TJbJLHFGGmlrXivPKXfPtwH5nnoPelp0XVz 2R6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689843455; x=1690448255; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k0Q8HK8TX799KwlVsueVU2Vn6pAZBPxCHZbkBqMog0w=; b=Q2saSoQsvlCL/WA6hJhYmK48OFULIjqYkoCMXRnDUgHen6HgGcq2TlVrwZfLqWBusY TYVcDI4tosNOhsOkgDqA+5O6llyv9qElizMdmJUR/g+paHmCp8Tfsf/ixFBL2IJR9xqO bZ3pwjGqWWWYglcUPHdzeOYXyCnVl9jCIJ0rLsXzZOiLJRme7nWAEQitgDXWfkZj7mHG aX268SLJ4sxJ20NrfVrTXFfi6P76pM90F5ESzkX0q1WvBV5/BNwbcW/fiCPwtM9TkZM/ DE8hB3ef8Sh+tZK8qrwr0Hh+eO7CyLOsrfScV+HfwGOC0m0qw9z6hrQMb1vsTIpAgl// dx1Q== X-Gm-Message-State: ABy/qLZJnz0QS7bWnZ+xR3AcVzQXeOAskowvJM9CQD+CrsobgqrWs1mA DMcDPtHBdT/d2gTPBggOH4IQskUeY4XEfaYOmjtP6g== X-Received: by 2002:a05:622a:1a12:b0:404:8218:83da with SMTP id f18-20020a05622a1a1200b00404821883damr159489qtb.1.1689843455136; Thu, 20 Jul 2023 01:57:35 -0700 (PDT) MIME-Version: 1.0 References: <20230711124157.97169-1-wuyun.abel@bytedance.com> In-Reply-To: From: Eric Dumazet Date: Thu, 20 Jul 2023 10:57:23 +0200 Message-ID: Subject: Re: [PATCH RESEND net-next 1/2] net-memcg: Scopify the indicators of sockmem pressure To: Abel Wu Cc: "David S. Miller" , 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 , 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)" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Thu, Jul 20, 2023 at 9:59=E2=80=AFAM Abel Wu = wrote: > > Gentle ping :) I was hoping for some feedback from memcg experts. You claim to fix a bug, please provide a Fixes: tag so that we can involve original patch author. Thanks. > > 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(-) > >