]> Git Repo - linux.git/commit
block, bfq: choose the last bfqq from merge chain in bfq_setup_cooperator()
authorYu Kuai <[email protected]>
Mon, 2 Sep 2024 13:03:27 +0000 (21:03 +0800)
committerJens Axboe <[email protected]>
Tue, 3 Sep 2024 15:51:54 +0000 (09:51 -0600)
commit0e456dba86c7f9a19792204a044835f1ca2c8dbb
treea786f1a3a6f64aaddb45d069d49cb2621a127517
parent18ad4df091dd5d067d2faa8fce1180b79f7041a7
block, bfq: choose the last bfqq from merge chain in bfq_setup_cooperator()

Consider the following merge chain:

Process 1       Process 2       Process 3 Process 4
 (BIC1)          (BIC2)          (BIC3)  (BIC4)
  Λ                |               |               |
   \--------------\ \-------------\ \-------------\|
                   V               V    V
  bfqq1--------->bfqq2---------->bfqq3----------->bfqq4

IO from Process 1 will get bfqf2 from BIC1 first, then
bfq_setup_cooperator() will found bfqq2 already merged to bfqq3 and then
handle this IO from bfqq3. However, the merge chain can be much deeper
and bfqq3 can be merged to other bfqq as well.

Fix this problem by iterating to the last bfqq in
bfq_setup_cooperator().

Fixes: 36eca8948323 ("block, bfq: add Early Queue Merge (EQM)")
Signed-off-by: Yu Kuai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
block/bfq-iosched.c
This page took 0.054156 seconds and 4 git commands to generate.