On 11/23/21 3:30 PM, Jan Kara wrote: > On Tue 23-11-21 09:06:47, Jens Axboe wrote: >> On 11/23/21 3:29 AM, Jan Kara wrote: >>> Currently we lookup ICQ only after the request is allocated. However BFQ >>> will want to decide how many scheduler tags it allows a given bfq queue >>> (effectively a process) to consume based on cgroup weight. So lookup ICQ >>> earlier and provide it in struct blk_mq_alloc_data so that BFQ can use >>> it. >> >> I've been trying to clean this path up a bit, since I don't like having >> something that just one scheduler needs in the fast path. See: >> >> https://git.kernel.dk/cgit/linux-block/commit/?h=perf-wip&id=f1f8191a8f9a0cdcd5ad99dfd7e551e8f444bec5 >> >> Would be better if we could avoid adding io_cq to blk_mq_alloc_data for >> that reason, would it be possible to hide this away in the sched code >> instead on top of the above? > > Understood. We could certainly handle ICQ allocation & assignment only > inside BFQ. Just this would mean we would need to lookup ICQ once in > bfq_limit_depth() and then second time in bfq_prepare_request(). I > guess not a huge deal given the amount of work BFQ does for each > request anyway. Exactly, it's noise there, but would not be in the general core. > So can I pull the above commit into the series and > rebase this patch on top of it? It's in my for-5.17/block, but might get rebased... For a series of patches like this, basing on it would be fine though, and you should just do that. -- Jens Axboe