public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: skip cgroups for passthrough io
       [not found] <CGME20231218153411epcas5p15bfb9e24856b5d719501c375e2bf3897@epcas5p1.samsung.com>
@ 2023-12-18 15:27 ` Kanchan Joshi
  2023-12-18 16:08   ` Keith Busch
  2023-12-18 16:47   ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Kanchan Joshi @ 2023-12-18 15:27 UTC (permalink / raw)
  To: axboe, tj, kbusch, hch; +Cc: linux-block, cgroups, Kundan Kumar, Kanchan Joshi

From: Kundan Kumar <kundan.kumar@samsung.com>

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>
---
 block/blk-cgroup.c | 3 +++
 1 file changed, 3 insertions(+)

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)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: skip cgroups for passthrough io
  2023-12-18 15:27 ` [PATCH] block: skip cgroups for passthrough io Kanchan Joshi
@ 2023-12-18 16:08   ` Keith Busch
  2023-12-18 16:47   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2023-12-18 16:08 UTC (permalink / raw)
  To: Kanchan Joshi; +Cc: axboe, tj, hch, linux-block, cgroups, Kundan Kumar

On Mon, Dec 18, 2023 at 08:57:22PM +0530, Kanchan Joshi wrote:
> From: Kundan Kumar <kundan.kumar@samsung.com>
> 
> 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.

Reviewed-by: Keith Busch <kbusch@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: skip cgroups for passthrough io
  2023-12-18 15:27 ` [PATCH] block: skip cgroups for passthrough io Kanchan Joshi
  2023-12-18 16:08   ` Keith Busch
@ 2023-12-18 16:47   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2023-12-18 16:47 UTC (permalink / raw)
  To: tj, kbusch, hch, Kanchan Joshi; +Cc: linux-block, cgroups, Kundan Kumar


On Mon, 18 Dec 2023 20:57:22 +0530, Kanchan Joshi wrote:
> 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,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-18 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231218153411epcas5p15bfb9e24856b5d719501c375e2bf3897@epcas5p1.samsung.com>
2023-12-18 15:27 ` [PATCH] block: skip cgroups for passthrough io Kanchan Joshi
2023-12-18 16:08   ` Keith Busch
2023-12-18 16:47   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox