Skip to contentSkip to conversation

block: skip cgroups for passthrough io

PATCH Applied Kanchan Joshi 3 participants 3 messages Dec 18, 2023 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20231218153411epcas5p15bfb9e24856b5d719501c375e2bf3897@epcas5p1.samsung.com

#1 lore raw

PATCH 1/1 block: skip cgroups for passthrough io

From: Kundan Kumar <[email protected]>

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.

---
 block/blk-cgroup.c | 3 +++
 1 file changed, 3 insertions(+)
block/blk-cgroup.c +3 -0
index 4b48c2c44098..58b13ef23821 100644
@@ -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)
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#2 lore raw
Quoted 6 lines · Kanchan Joshi

From: Kundan Kumar <[email protected]>

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.

Looks good. Our passthrough commands still need to call bio_set_dev() for integrity data, so this is type of check is the easiest way to avoid the overhead.

maintainer Applied
#3 lore raw
In reply to Kanchan Joshi
Quoted 6 lines · Kanchan Joshi

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.

Applied, thanks!

[1/1] block: skip cgroups for passthrough io

      commit: 6c9b97085c473e380e57cf33c95d2c74444b2a5d

Best regards,

Signature · 1 line
Jens Axboe