Re: [PATCH 2/2] blk-mq: ensure a q_usage_counter reference is held when splitting bios

Christoph Hellwig
2024-01-12T05:44:53Z

On Thu, Jan 11, 2024 at 01:06:43PM -0700, Jens Axboe wrote:
> Something like this? Not super pretty with the duplication, but...
> Should suffice for a fix, and then we can refactor it on top of that.
> ioprio is inherited when cloning, so we don't need to do that post the
> split.

Yes, this could work. It'll get worse with anything we need to do under
q_usage_counter counter, though. I mean, it is a perpcu_counter, which
should be really light-weight compared to all the other stuff you do.
I'd really love to see numbers that show it matters.

> For the bounce side, how would these settings change at runtime?

Well, we don't really prevent any setting from changing at runtime.
But yes, neither mmc nor the few scsi drivers using it seems to do
any runtime re-configuration.

> Should
> be set at init time and then never change. And agree would be so nice to
> kill that code...

I wish we could see some more folks from the mmc maintainers to do
proper scatterlist (or bio/request) kmap helpers. The scsi drivers
could easily piggy back on that or just be disabled for HIGHMEM configs.