Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1706106rda; Tue, 24 Oct 2023 00:09:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpDF+Qo6vq4dSD/zIJZE9jX5qrXcf4MI24cywObuA1WSL6lgRumCGuRDh6mZkDNm1zbovm X-Received: by 2002:a05:6a20:1596:b0:17d:faed:603c with SMTP id h22-20020a056a20159600b0017dfaed603cmr2430613pzj.11.1698131341192; Tue, 24 Oct 2023 00:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698131341; cv=none; d=google.com; s=arc-20160816; b=BV6XxfPKUETl2cmkv6dkiL2XXksJvreWmR1f91dc+r0pM1VTbeLoVsqKSf1sWvMHWD bGxETDXDsZCI06cuNn7wHnQK7bRWTlz8am4V3ecUSstl7rqnuj2OVjsLcxs1AGrE/zs3 QYSljmjaf/1OBa82Bo8cwwPpH7oJ4d1f4oTOZH4V5WfxMPD0b56gMydmhfHEX3Wcls3c JI0fILdWEqc4drGaDE1kbfwNOz/pBFgO9YHi2xqpAiJ+MUGL9IWR1jEEtRfhUk2baNWb B2HPxAdo+k5az28w8TIXCa8aWgi9/uDWPysJ46mZe2X8chGF0p5WZYgQhFtQBVEvWGeB Q6NA== 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=e2ft1iIUeqg/aot+9+OZB9Lfvws+RDiPr3cR/Bz0A1g=; fh=RIaidaJKX9r7ab1sw5oEfNaq9kU+TaQv+9CKnGcFK6Y=; b=aki5cxa3K6tmQG1GZ3vCLusTweLMq8bpxVX/5ByOB6URliIXMBBdrleYUSKovyWCUF emuIEOda41/QGiTO7jaZnTRLMXgkQk9ViUnSZOnprgUJfEF8w4lJRMNI+znK/kaSyt2O dXMHi7+/H5MAfABGIcOfOSicGRq5qu1quZlZBFwQUv8HgAXg99xu7gYgiwnmYUSAlhho gzX9KLjd3eCBZNoqoHVvoKUZJukFZQwsA2ePBIDhbV/80sAeNKgarLcT9luJNbrZ4b/M 1wHFl1sxwFpfdJ+3RMooUaL+jao50BL5Vwr8fy5l3HSufiQCINAHzOMyWaVAHQ+XW8yQ thqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UzkfCgby; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id g12-20020a056a000b8c00b00691023321ebsi8108637pfj.113.2023.10.24.00.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 00:09:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UzkfCgby; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 49B118031E39; Tue, 24 Oct 2023 00:09:00 -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 S232686AbjJXHI4 (ORCPT + 99 others); Tue, 24 Oct 2023 03:08:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232714AbjJXHIy (ORCPT ); Tue, 24 Oct 2023 03:08:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42162110 for ; Tue, 24 Oct 2023 00:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698131288; 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=e2ft1iIUeqg/aot+9+OZB9Lfvws+RDiPr3cR/Bz0A1g=; b=UzkfCgbyIVDbsENfkEmuQ+Rz/3ZaJDwTv6pmduVxxFx6cdPaK+TX05kMxaVTPaMuLLNGDG 4N1jvS4/pPUnfFMNgFsgeC46uBxA5ocTeu3NQ2FR1YOmKEi6wlSHCMJwb/SBL0y0kpoLhW qd/xux/vVrxd1EGvUcr7EH+3VgaFAuI= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-1f2VBNBuM3an7NzxCM5XQA-1; Tue, 24 Oct 2023 03:08:07 -0400 X-MC-Unique: 1f2VBNBuM3an7NzxCM5XQA-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-53f8893ddbdso855264a12.1 for ; Tue, 24 Oct 2023 00:08:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698131286; x=1698736086; 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=e2ft1iIUeqg/aot+9+OZB9Lfvws+RDiPr3cR/Bz0A1g=; b=ZZ60yNmN8ceZe679esdIYnGZgKUzmma+JTP4oFP1kgj8DoG9umwiodobjPCiOxO3Yw 861KlabdOfquoAbw77t7ilrTIcAqYiqPbdOpZ+IKg1msQaq5QhJ5rnDmRJXsfOsOwYLD 9YRV5RnKvlwuijPVitZOSNpzprdKLrodZHK4VhX6eCcajvXZEpkyl7cy/MM3gAz7j3Lc fAN7BewxPjQal3C6RrMDcj9uil34VEKZye3fToKmDM/XsN5dVM59QRkawN+6cWZEf2IE aMoc+hcaTYQc0cXhx8BQWx/xg70vXBCnxW1TM1iMQz8K/NuUvBYNZc1dJtgGOsayJW8t pcuw== X-Gm-Message-State: AOJu0YxipW8lpbuh36WZHkYPTlRMuEhtBNhi7bEf1ew0pQ5qBUzl9P1l BdUe5Z0tu61732LilGng++nFKQNeHg4mjZFgaE0N93gV/91gekIcKmOEIGMBxarNveURMl4e79F V7HtjGM6lFs/ArtLC7hlo14W7 X-Received: by 2002:a17:906:74d9:b0:9c3:9577:5638 with SMTP id z25-20020a17090674d900b009c395775638mr7384965ejl.0.1698131285919; Tue, 24 Oct 2023 00:08:05 -0700 (PDT) X-Received: by 2002:a17:906:74d9:b0:9c3:9577:5638 with SMTP id z25-20020a17090674d900b009c395775638mr7384951ejl.0.1698131285585; Tue, 24 Oct 2023 00:08:05 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-237-0.dyn.eolo.it. [146.241.237.0]) by smtp.gmail.com with ESMTPSA id 20-20020a170906019400b00992b8d56f3asm7794023ejb.105.2023.10.24.00.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 00:08:04 -0700 (PDT) Message-ID: <69c50d431e2927ce6a6589b4d7a1ed21f0a4586c.camel@redhat.com> Subject: Re: [PATCH net v3 3/3] sock: Ignore memcg pressure heuristics when raising allocated 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: Tue, 24 Oct 2023 09:08:03 +0200 In-Reply-To: <20231019120026.42215-3-wuyun.abel@bytedance.com> References: <20231019120026.42215-1-wuyun.abel@bytedance.com> <20231019120026.42215-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_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham 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]); Tue, 24 Oct 2023 00:09:00 -0700 (PDT) On Thu, 2023-10-19 at 20:00 +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. > So revert that behavior. >=20 > After reverting, __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 > Signed-off-by: Abel Wu > Acked-by: Shakeel Butt > Acked-by: Paolo Abeni It's totally not clear to me why you changed the target tree from net- next to net ?!? This is net-next material, I asked to strip the fixes tag exactly for that reason. Since there is agreement on this series and we are late in the cycle, I would avoid a re-post (we can apply the series to net-next anyway) but any clarification on the target tree change will be appreciated, thanks! Paolo