Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp285156rdb; Thu, 19 Oct 2023 04:42:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1FrYHWwRjuoXnsAFTEof4/RTAOPeQwfAHckuO1w2AOU0cAc/7Cl2PT8ZTtEPyBzVV5XTt X-Received: by 2002:a05:6a20:42a0:b0:16b:c9f2:b632 with SMTP id o32-20020a056a2042a000b0016bc9f2b632mr1963966pzj.62.1697715766993; Thu, 19 Oct 2023 04:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697715766; cv=none; d=google.com; s=arc-20160816; b=ddwPS6nYWgNmxac2IXrXD9n2zpNaONw8CHW16le54bwbO+ZYWmmtqZYmDsPWnvkMYF ftu2064VrkYAL0IjyyUjxMsj8tnJ8WyyBTYKiyuURjwdlvcs3mbK8L4b9YtB/fLtzDd3 ftD8pxU8YZwPEkNxMyXkSw1CkqfhwbcSOtG0orKPS28g/QTXvBXnOIt80+3V7U/VZIl9 RsQTBH9s6+2B7vqtWWPgr6EDPc1qUD2nL1zEzSMzdAf47eMya7gnTkK3K4FLlwKf9Id1 GA8Rbeym2T6iwZVE4TLtPDVHLCsIuEKabVV+nQI7ZOBiYIbsT+V/zowndqalGc3nHxuX grWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=2TI/4hZfm5I46y0D29HAGjnS5oa9EwhobJ1CLerArnE=; fh=RIaidaJKX9r7ab1sw5oEfNaq9kU+TaQv+9CKnGcFK6Y=; b=tCo9vmUTY/6f3M1O3ggrUAuS/iyGYrVdQzOk50x9dQ7dReGmM6fhmHCdgwevpdaLST vuomiAsnfu5x8DOTsDzXTQFLSqSRYmHBp3jWWKl+tjwPbzKeH+MXwAUqXc5Xtziwc96J x60nXdRF/J/nF7igKwnO31hRfH4hPC/wBak8v3nFQfFep9ZJwiiMVrFIm3O7bhrQ1KTE rZMs3BPCpYumvgqVRhma7d/BJs09v3QKoCQKfhE2JQVEnFwmCW1HP0afh1lPkkAYayfm QheAEjGr+hvshe1io7dBFzz1up6bnWfNsZ9dxfj9hVvJf4gwUb6WjLltUnI0LovvMKdW g5nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zeeb002v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jj3-20020a170903048300b001bdf6eb05f2si1878208plb.227.2023.10.19.04.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zeeb002v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 32BE1822CD73; Thu, 19 Oct 2023 04:42:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345429AbjJSLmk (ORCPT + 99 others); Thu, 19 Oct 2023 07:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345393AbjJSLmi (ORCPT ); Thu, 19 Oct 2023 07:42:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACE11BE for ; Thu, 19 Oct 2023 04:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697715712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2TI/4hZfm5I46y0D29HAGjnS5oa9EwhobJ1CLerArnE=; b=Zeeb002vtfB57UtFfyNrl5OVnq/RbdNJow8xHrtE9hnZlFKtIXhEvsIC5LYhEYCIGlXWwD 4ciBp3Hb8ndwdOtRROFUBcgegEIhSyeNwAmS6h0N7/cxEaWM9PwsA7Ir8Tu58+uJqeEfS2 q+lPVp7iP+a2k0BBwskQ9pgcoGuVZOE= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-687-HPIcWzPoPAGAnoBghXv9SQ-1; Thu, 19 Oct 2023 07:41:51 -0400 X-MC-Unique: HPIcWzPoPAGAnoBghXv9SQ-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9c39f53775fso63448566b.1 for ; Thu, 19 Oct 2023 04:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697715710; x=1698320510; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2TI/4hZfm5I46y0D29HAGjnS5oa9EwhobJ1CLerArnE=; b=SJ1gOQfbPm9KQ3bAHPTLjtTH9quMJHwQIA7tYFgm/G9Rzl9B0kxuJylAaF69RQlerr Bcr95fijJeiphxD7f9p7qCZJzgUAK+cz4pGX2Sg+92uiA0H5DBL8QMuCYC6CdT4tT8nS kxcfXzuB8hXQz1rHBddFvtpe+uFQh5ncrDXBe+/R4IWG4f054nPb8rlgs1BgoBYqM+YC k8BRzAhNYcHC0Q72pN39Q2uaS/k7Hz0Yci7mtWfluCeEZe+Nayl1ic/rWH2tvqWhPKUe 5pFadvmSxEgK5zAWTCgxJ6/xVmvzEaVHHa8kZEzCoiE8B8n7eLCEJHIDYBzAKbNjG1xx Z4OQ== X-Gm-Message-State: AOJu0Yyo6WVzlYZDJps5LL612j14c46/PftXjInmRGoeWQbsx7uWY5zj QQiQR1bMF1uVhX7x6SUJO0rcKonqN4sT59rkgxl07/DCdn/lpZGk8seBiROJR6jCQiB36nMEoka gn34kh9slVrz94HVksNmjf9Au X-Received: by 2002:a17:906:4784:b0:9c3:cefa:93c9 with SMTP id cw4-20020a170906478400b009c3cefa93c9mr1808807ejc.1.1697715710014; Thu, 19 Oct 2023 04:41:50 -0700 (PDT) X-Received: by 2002:a17:906:4784:b0:9c3:cefa:93c9 with SMTP id cw4-20020a170906478400b009c3cefa93c9mr1808793ejc.1.1697715709608; Thu, 19 Oct 2023 04:41:49 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-237-142.dyn.eolo.it. [146.241.237.142]) by smtp.gmail.com with ESMTPSA id g13-20020a1709063b0d00b009ae3e6c342asm3421743ejf.111.2023.10.19.04.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:41:49 -0700 (PDT) Message-ID: <4c68b650b02b2a49f90cdf3a0084cf31bd6c7979.camel@redhat.com> Subject: Re: Re: [PATCH net-next v2 3/3] sock: Fix improper heuristic on raising memory From: Paolo Abeni To: Abel Wu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Shakeel Butt Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 19 Oct 2023 13:41:48 +0200 In-Reply-To: References: <20231016132812.63703-1-wuyun.abel@bytedance.com> <20231016132812.63703-3-wuyun.abel@bytedance.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:42:46 -0700 (PDT) On Thu, 2023-10-19 at 19:23 +0800, Abel Wu wrote: > 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. > > >=20 > > > 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. > > >=20 > > > 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. > > >=20 > > > Fixes: e1aab161e013 ("socket: initial cgroup code.") > >=20 > > 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. > >=20 > > Please repost without such tag, thanks! > >=20 > > You can send the change to stables trees later, if needed. >=20 > OK. Shall I add a Acked-by tag for you? Let's be formal: Acked-by: Paolo Abeni /P