Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1064364rda; Mon, 23 Oct 2023 00:51:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsmxRe8tm26BLpg5+a7dQWdIwBKi0aKl10vl1VrQRqfnw2Hey9wbeG4EhEp+BBA8gySCnY X-Received: by 2002:a17:902:e542:b0:1c6:11ca:8861 with SMTP id n2-20020a170902e54200b001c611ca8861mr15707750plf.21.1698047485622; Mon, 23 Oct 2023 00:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047485; cv=none; d=google.com; s=arc-20160816; b=FeQyfOdObqpuNx248Ro8Ucf/Zq8o5HUhx7WT17kp0SsspTmCv/N7XpSmQ+laQdXEnJ zBBoTKAJkERcZIBvnwFcUfxNOY38EcDTRekUSn703eQ7KWVIgdHR8+mGg/9wQ+rHDYW+ aQ7hPb63RG5zccXL0sAncU4vn3QCsbxsEqq+5siSoKLg7zXOlMS9Lur5F7MRH9mmuHVS iclGVKL8mm1E8O7ciBCfkz7N7/WTOAjvm9wIkJBx9lYSIjLojjdf1c2a/FKuSFuJjBrW XEAmUstYWqj2cd4VG7jbT6S8/HH7KQRIYeWjwePUfsAJakmMvsqgZ1FO3eVHosnOYFno rzPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ypoYlFEPAp0LiNHXColIafSj5qUf2kQXkNyLo4B+09U=; fh=oHhRAa/5qL1GTDBBqn0pkOs5yq1alC3E07wwnhGqIk4=; b=uAOhAbddmw04ONQcxyvDP5gp/qmj8Tfs5Y0cwob4pPXu8oADg0ETgE6vDZ/0NsUAeP 3K8OyeLKOckJtyNgUjlQqasXHJ8AAqXTL57H7CvV6m+Qnt6rfoO+ZkD3Ec+mJOi+dHCN 2gNyANk3JwjrWL46R8uifYZPCp55wTZWY3+6pQqtjBBY4AerESAVwSbBxp+axhxmZTw4 V+hIhtuTGzZ0XFJ/pJP72Ou+S5ex1635ZRMD46Bk2ZGFgB6AlcYkjJkiH84BDNwp/16C EZkZl4aDaCIZeE2/d89XqW7IOS9/1iL3eG/XvrpJe+e1C716lfI26Ct68//xujITQe5O /ADQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HqR3Z07z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u12-20020a170902b28c00b001c9ad6278ddsi6072498plr.96.2023.10.23.00.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HqR3Z07z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 768E6807D8D2; Mon, 23 Oct 2023 00:50:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233577AbjJWHuQ (ORCPT + 99 others); Mon, 23 Oct 2023 03:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233625AbjJWHuM (ORCPT ); Mon, 23 Oct 2023 03:50:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439F610F4 for ; Mon, 23 Oct 2023 00:50:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6958BC433C8; Mon, 23 Oct 2023 07:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698047404; bh=v2aM/kvq72VOZ3jr1hNqEC20sqhqlJwe771PUm7Sbsk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HqR3Z07z0GtHMmF5bpI7wwNlVb2Kw418tFJCwKpbhmQ9oLt+gN+d7AEX/g+odrA6N J0jCpTO4vl0fzwBJs/g/C+BwTwm9RxDUy+XXqhp/eSfluVTrsRzN/k0sWudpp+mpgc Dm3cQ3qetvwvjem3Tai9qFLuj/jnKEwdUECc6+RQpGGvpphxgdQxGU3+YlvJ4HQw1h aHvx34K+Utp3QtIiIVPIfHzoReqkF0uG6wIw9gSwMZRtHLkDLt3zbfj0ebfspWyatL FmMUOYzBURQlTRP/+Y//2TWhBCKMqGeNyUIbWBM9UnqsjrwTfybLJmpzJ/O29Zvfwk yE7tS1GaOO+eA== Date: Mon, 23 Oct 2023 08:49:59 +0100 From: Simon Horman To: Abel Wu Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shakeel Butt , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v3 3/3] sock: Ignore memcg pressure heuristics when raising allocated Message-ID: <20231023074959.GV2100445@kernel.org> References: <20231019120026.42215-1-wuyun.abel@bytedance.com> <20231019120026.42215-3-wuyun.abel@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231019120026.42215-3-wuyun.abel@bytedance.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:50:31 -0700 (PDT) On Thu, Oct 19, 2023 at 08:00:26PM +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. > So revert that behavior. > > 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. > > Signed-off-by: Abel Wu > Acked-by: Shakeel Butt > Acked-by: Paolo Abeni Reviewed-by: Simon Horman