Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp275728rdb; Thu, 19 Oct 2023 04:24:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGq9My1Yq8GosuyNfDVyQFDgHJ0onGO0NFUVTRTdU6R26b6waKGASFVLU3VDwRB9o2r4nra X-Received: by 2002:a17:902:e986:b0:1ca:16e8:1b4c with SMTP id f6-20020a170902e98600b001ca16e81b4cmr1819044plb.28.1697714670840; Thu, 19 Oct 2023 04:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697714670; cv=none; d=google.com; s=arc-20160816; b=SjqIq/rioVuR/GUPl8AisQbffiw1B6YCSBIRD6Y/AKFBsDw1B9/Z/x3WZve8r7jHH6 30+bviuaPN/P7fBMbzhbPFHWhyJY87GXOZR+6lEyR1Loo59XU+GSLEXOq4IpmjKEFh17 NTMK68SqJcyzSqn5AeT5QX3K4rDP6+RuDD9EZHi4u+tB3bwMUqDB+YRlkIHcRRrnJDw/ BAUm+YPhdMXZCO3YEY9JUG/4MzwKOMnRa9djkEFurB4/8vyFYqAeySRLKa2JurUoi3BI 1FcaRRgwdEjG1h5tDzsaVoSNCt6HvDy+cOFKbSNpJv1JpgQz5KSNOtQ+wsTJUk58whhc keMg== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=VF/u7v+FfXAzClIKnamx2tkzWYY5JIn4XlyArKKgPL8=; fh=odsmkts75NkkNibO5vCM47RTOkxTakZGad8Vh/SDRiE=; b=BClTMJATyrcEbNN9lX3CfK4yVq1PUAd1rbsjPADE/k1i5pIYvUC70gZ9Vh7PJu6KUE r9aXwPQaHPsSboTQ99xU2l27HWOk+rtsLlisWnDKr3pUsgzZMfTVr+L1eofIc3pNxvGe pTqee3JVb8rMeRioKrL8Rm45QONzvrckAiARHm1YuzQV3fmMeVl/hvFBo88Oatny/8GS 0YD8ZgI7pUah8JjHegk7cRUDpQ3xSyxvljJUht5HP6QTU9kguUjRgC5QD1QWJhU07XRh wT6iTRCEYo/hjPtVE1CHoxi7mAt9z8Cgz9HqMTuyqfbGVWyLV7lcyDSYj5VUAA1IqwVu Tfzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=X7U1rshc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k9-20020a170902c40900b001bf1d1d99b0si2002190plk.568.2023.10.19.04.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:24:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=X7U1rshc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AADE18182EF9; Thu, 19 Oct 2023 04:24:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345343AbjJSLYV (ORCPT + 99 others); Thu, 19 Oct 2023 07:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345280AbjJSLYU (ORCPT ); Thu, 19 Oct 2023 07:24:20 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1467F112 for ; Thu, 19 Oct 2023 04:23:57 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c9d922c039so63883265ad.3 for ; Thu, 19 Oct 2023 04:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697714636; x=1698319436; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VF/u7v+FfXAzClIKnamx2tkzWYY5JIn4XlyArKKgPL8=; b=X7U1rshc9628aproLgSEJDvZkQ4KZ41S5ByEryPlsSgwmRpYQ+GELRdFUwBdk40hW2 HDkWT1qrcum3FbAbEQZlrGaxA3dEJrc9ZmG+DubayKKR+8vBkK3Mk6e0j4ZLe4ew3JVv fvtdB/1c4EAotIcSV6nLv/KyBxoDIKVxNcq2x08EoaGvrv2Q5Khq5JBBM/7Mk3qGCpx5 l0gWu8hqN3clDrF15rcF7UaQ6Q9+gLUuRUb0UaZX+BikpHJxRt72gJryz5RmufRHsNFd FTSLa/py1Pm6+qgIEifmfyeQL5jpQcRMJ2XNJSbBNagsO68LD6yH2PkeQLybrn1H8b4r Ca1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697714636; x=1698319436; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VF/u7v+FfXAzClIKnamx2tkzWYY5JIn4XlyArKKgPL8=; b=kNY+TMHBSYEFhhpRxXDIx9hSgWuEDfqK5YhkoNNcuxzQ0/tDsSUgEmdrmc2j89/lkM 9bWchLFqOxaRZpSsbHOgssBQEGzrOmnkAD/U29L2h4WL+3mR2XSeR3XLjcTGEsQywRfw CeQMaMDr7X1JvBV2sO7Xa6YBWQkpQjl2gSiQ046dNDDjHN+o79a9MPjUICC6m0y/s3ko g6wQ+XHCKxT4tEnQ9vwxJrUWmFydGBJYXW+JFe+JLFZfJQu8b9Yr/V/Fublwq4lOCeUm e6g+Dq84j00BXbgRduUQU+I49a/Rc1zEmnq3E/kaMKYzkxpud/xdWKkaZQpFaBF3gd/6 ySaQ== X-Gm-Message-State: AOJu0YzWwQBLdUJZBpkOTdmy3Vzvsl/BBO2rAR3JxQ3Cd3cciq+jmrDy 2BHKDkVtezlckHHn6byEseqe8w== X-Received: by 2002:a17:903:11c7:b0:1c7:2740:cfb3 with SMTP id q7-20020a17090311c700b001c72740cfb3mr2336782plh.35.1697714636426; Thu, 19 Oct 2023 04:23:56 -0700 (PDT) Received: from [10.84.154.4] ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id ju2-20020a170903428200b001c736b0037fsm1699750plb.231.2023.10.19.04.23.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 04:23:56 -0700 (PDT) Message-ID: Date: Thu, 19 Oct 2023 19:23:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Re: [PATCH net-next v2 3/3] sock: Fix improper heuristic on raising memory Content-Language: en-US To: Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Shakeel Butt Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231016132812.63703-1-wuyun.abel@bytedance.com> <20231016132812.63703-3-wuyun.abel@bytedance.com> From: Abel Wu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:24:28 -0700 (PDT) On 10/19/23 4:53 PM, Paolo Abeni Wrote: > On Mon, 2023-10-16 at 21:28 +0800, Abel Wu wrote: >> Before sockets became aware of net-memcg's memory pressure since >> commit e1aab161e013 ("socket: initial cgroup code."), the memory >> usage would be granted to raise if below average even when under >> protocol's pressure. This provides fairness among the sockets of >> same protocol. >> >> That commit changes this because the heuristic will also be >> effective when only memcg is under pressure which makes no sense. >> Fix this by reverting to the behavior before that commit. >> >> After this fix, __sk_mem_raise_allocated() no longer considers >> memcg's pressure. As memcgs are isolated from each other w.r.t. >> memory accounting, consuming one's budget won't affect others. >> So except the places where buffer sizes are needed to be tuned, >> allow workloads to use the memory they are provisioned. >> >> Fixes: e1aab161e013 ("socket: initial cgroup code.") > > I think it's better to drop this fixes tag. This is a functional change > and with such tag on at this point of the cycle, will land soon into > every stable tree. That feels not appropriate. > > Please repost without such tag, thanks! > > You can send the change to stables trees later, if needed. OK. Shall I add a Acked-by tag for you? Thanks! Abel