From: Kundan Kumar Date: Mon, 18 Dec 2023 15:27:22 +0000 (+0530) Subject: block: skip cgroups for passthrough io X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6c9b97085c473e380e57cf33c95d2c74444b2a5d;p=linux.git block: skip cgroups for passthrough io Even if BLK_CGROUP is enabled, it does not work for passthrough io. So skip setting up blkg for passthrough bio. Reduced processing gives ~5% hike in peak-performance workload. Signed-off-by: Kundan Kumar Signed-off-by: Kanchan Joshi Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20231218152722.1768-1-joshi.k@samsung.com Signed-off-by: Jens Axboe --- diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4b48c2c440981..58b13ef238210 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -2064,6 +2064,9 @@ void bio_associate_blkg(struct bio *bio) { struct cgroup_subsys_state *css; + if (blk_op_is_passthrough(bio->bi_opf)) + return; + rcu_read_lock(); if (bio->bi_blkg)