Thread (12 messages) 12 messages, 5 authors, 2026-08-20

Re: [RFC PATCH v3 3/3] blk-cgroup: move async bio punt state to blkcg

flat view

From: Tao Cui <hidden>
Date: 2026-08-20 09:59:12
Also in: cgroups, dm-devel, gfs2, linux-bcache, linux-doc, linux-fsdevel, linux-mm, linux-raid, lkml, nvdimm, virtualization


在 2026/8/18 15:06, Yu Kuai 写道:
blkcg_punt_bio_submit() currently queues punted bios on blkg->async_bios,
so it has to call bio_blkg() to find or create a queue-local blkg.  Bios
now carry and pin the blkcg css, so punted bio lifetime no longer needs to
be anchored by a blkg.

Keeping the punt state in blkg can instantiate a blkg even when no blkcg
policy is enabled, just to bounce submission from a shared kthread.  Move
async_bio_lock, async_bios and async_bio_work to struct blkcg, and queue
punted bios on bio_blkcg() for non-root cgroups.  Root or unassociated bios
are submitted directly.

This preserves the priority-inversion avoidance while preventing
blkcg_punt_bio_submit() from creating blkgs that are not needed by any
policy.
Reviewed-by: Tao Cui <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help