From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796316187; b=PkIo0ow4QwbROIRmktW+WV2VuW1DEWksIrAiLoYrVP1h1kPN4Hl6sxdSwQHt0q1hmFzW WSg87uPi2786iWHS36hs6kBZHTh/CV/hJICkC1ml9XfiKuA5zdXXl5MYAZhLIq1GsMOPm 0fZZ54K3IL8Q9k3mtWdIZO736HxTkE4+ASty4cwi3S7NAOXdq1R8hf61goC+qL1PCAa5s NGZghMJmM+HEMNVYVT32Nh++cuipDsXuvPX0yeeHpAOiQw7Hxh9sYCGD+vzKjJkJia/Ny nuXUMkqJjeY3aot0UMpZrHtH58I5NlCUqd6dSPBnpRiCYohTbmxQ24Rg32+tSvEzcfw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796316187; h=Received:DKIM-Signature:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=McJRXqRLApTBC8c22UvMt3uvpVqCulVe8akgf3wAZ+M=; b=MdYymDD3LL+rnmdD+Y0gzsoi441b7Cde0rYlR+hFRuWsBgyraSJV/qPilMIoH+yENov6 xHGFT1R6gj27fN6fU9mfB7x8Q6pFVTqZrgHghMEie4ImMTH7Sn2mOfHXhagEJOwq1w/6f USpUtOgr1FmPlK1hR98L3YWeeRfNj/pyNxh9hzKzq8dmvg28ZIishOZGslwBFlbScEBEP OnXOXWG6MZmD5gZ7iahDkb35HQ2HLWUbg+1kfXX8eKKH9oKS9stYBjI3qA+tp9n+mTKTw pn/720SxGTKBOwyZZrHVKicz/7W6YAOAI240kZYoyg5xxuFGL6ZMKQsHx2gUV+mnefg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=egrEVJqn; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44F6D606A680; Thu, 3 Dec 2026 16:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=egrEVJqn Received: by smtp.kernel.org (Postfix) with ESMTPSA id 994D81F000C1; Thu, 3 Dec 2026 16:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796316186; bh=McJRXqRLApTBC8c22UvMt3uvpVqCulVe8akgf3wAZ+M=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=egrEVJqn659F9Q7hZeg0w9W10iOXzk3cK1Ukgk7xImlx51vuvT2dpmKNWdpbeU4KL ruQOFWC3koyaBzquXgAVJbfbfdJ8ACMTBnhxhcLfpCf+zmejpDqNcCfdcRiujB6BiY tgnb/W9bW6Mn0d0uNd3fUG1+wFaWUJWb87wJ5KNsffLAIA93wXMNnNm1+21A3EjDxA l4d52tbkYO/z5zIX8MvQZEAjvUa/F/5vc8j9AOpuZvFLAXexIv1+9CL3oal/Omkdyj OWBnR+tfly3ZR4ZddwybobLAtMlJK0AaKxjX8r/uKwgo++6l39IC8LLE3ZJRFlDbog n181VzvwMuz1A== Date: Thu, 03 Dec 2026 06:43:05 -1000 Message-ID: From: Tejun Heo To: Fengnan Chang Cc: Christian Brauner , Shakeel Butt , Jens Axboe , Christoph Hellwig , Josef Bacik , Johannes Weiner , Michal Hocko , Roman Gushchin , =?utf-8?q?Michal_Koutn=C3=BD?= , cgroups@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: Per-bio cost of BLK_CGROUP=y, measured after 7693e1350b06 ("memcg: make MEMCG select BLK_CGROUP") In-Reply-To: <20261203130234.3718286-1-changfengnan@bytedance.com> References: <20261203130234.3718286-1-changfengnan@bytedance.com> X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, Fengnan. On Thu, Dec 03, 2026 at 01:02:34PM +0000, Fengnan Chang wrote: > - Is this per-bio cost of BLK_CGROUP=y expected and known? That's not great. blkcg shouldn't add noticeable overhead when it's not in active use. > We have been working on reducing this per-bio overhead without > reverting the commit. Removing most of it takes a series of roughly > 8-9 patches across blk-cgroup, percpu-refcount and the block merge > path, and it is still being tested. It'd be really great if each improvement comes with before and after benchmarks, so that how much overhead each one removes is clear and can be weighed against whatever complications it brings. Thanks. -- tejun