Re: [PATCH v4] blk-throtl: Introduce sync and async queues for blk-throtl

From: Tejun Heo
Date: Mon Jan 09 2023 - 15:40:49 EST


On Sat, Jan 07, 2023 at 09:07:38PM +0800, Jinke Han wrote:
> + * Assumed that there were only bios queued in ASYNC queue and the SYNC
> + * queue was empty. The ASYNC bio was selected to dispatch and the
> + * disp_sync_cnt was set to 0 after each dispatching. If a ASYNC bio
> + * can't be dispatched because of overlimit in current slice, the process
> + * of dispatch should give up and the spin lock of the request queue
> + * may be released. A new SYNC bio may be queued in the SYNC queue then.
> + * When it's time to dispatch this tg, the SYNC bio was selected and pop
> + * to dispatch as the disp_sync_cnt is 0 and the SYNC queue is no-empty.
> + * If the dispatched bio is smaller than the waiting bio, the bandwidth
> + * may be hard to satisfied as the slice may be trimed after each dispatch.

I still can't make a good sense of this scenario. Can you give concrete
example scenarios with IOs and why it would matter?

Thanks.

--
tejun