From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6366D10950 for ; Mon, 23 Oct 2023 07:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HqR3Z07z" 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231019120026.42215-3-wuyun.abel@bytedance.com> 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