summaryrefslogtreecommitdiff
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorKundan Kumar <kundan.kumar@samsung.com>2023-12-18 20:57:22 +0530
committerJens Axboe <axboe@kernel.dk>2023-12-18 09:46:53 -0700
commit6c9b97085c473e380e57cf33c95d2c74444b2a5d (patch)
tree36ff5af11bc93f08265aea9ca4c57d3c4838802c /block/blk-cgroup.c
parent0c734c5ea76e333fbb8dd83b5bab46291b38096b (diff)
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 <kundan.kumar@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20231218152722.1768-1-joshi.k@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 4b48c2c44098..58b13ef23821 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)