Re: [PATCH] blk-cgroup: add CONFIG_BLK_CGROUP_DEBUG_STATS option

From: Michal Koutný

Date: Thu Feb 12 2026 - 05:26:44 EST


Hello Breno.

On Wed, Feb 04, 2026 at 08:15:12AM -0800, Breno Leitao <leitao@xxxxxxxxxx> wrote:
> Add a Kconfig option to enable blkcg_debug_stats by default at compile
> time. When CONFIG_BLK_CGROUP_DEBUG_STATS is enabled, additional debugging
> information is shown in the cgroup io.stat file, including cost.wait,
> cost.indebt, and cost.indelay for iocost, as well as latency statistics
> for iolatency.

This seems to be toggleable quite easily anytime at runtime (not sysctl
but modprobe config), not a boot cmdline where CONFIG_ default could
step in.

This only guards printing of already collected stats (sometimes even
without kernel consumers), not sure if it's that useful.

blk-cgroup isn't modularized since 32e380aedc3de ("blkcg: make
CONFIG_BLK_CGROUP bool") v3.5-rc1~42^2~92 exposing it like a module
parameter is historical artifact.

So I'd dare to propose removing it altogether and print those stats
everytime. Readers of the nested-keys format should survive that.
(I don't even see the param documented.)

And if there were eager readers that'd be affected performance-wise,
more conventional would be to make this only boot cmdline parameter that
could static-branch also the stat collection spots (for some more
benefit). And then would also a CONFIG_urable default make sense.

WDYT?

Michal

Attachment: signature.asc
Description: PGP signature