Skip to content

Commit c9e91cf

Browse files
axboepopcornmix
authored andcommitted
Revert "block, bfq: honor already-setup queue merges"
[ Upstream commit ebc69e8 ] This reverts commit 2d52c58. We have had several folks complain that this causes hangs for them, which is especially problematic as the commit has also hit stable already. As no resolution seems to be forthcoming right now, revert the patch. Link: https://bugzilla.kernel.org/show_bug.cgi?id=214503 Fixes: 2d52c58 ("block, bfq: honor already-setup queue merges") Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 85b6910 commit c9e91cf

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

block/bfq-iosched.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,15 +2526,6 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
25262526
* are likely to increase the throughput.
25272527
*/
25282528
bfqq->new_bfqq = new_bfqq;
2529-
/*
2530-
* The above assignment schedules the following redirections:
2531-
* each time some I/O for bfqq arrives, the process that
2532-
* generated that I/O is disassociated from bfqq and
2533-
* associated with new_bfqq. Here we increases new_bfqq->ref
2534-
* in advance, adding the number of processes that are
2535-
* expected to be associated with new_bfqq as they happen to
2536-
* issue I/O.
2537-
*/
25382529
new_bfqq->ref += process_refs;
25392530
return new_bfqq;
25402531
}
@@ -2594,10 +2585,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
25942585
{
25952586
struct bfq_queue *in_service_bfqq, *new_bfqq;
25962587

2597-
/* if a merge has already been setup, then proceed with that first */
2598-
if (bfqq->new_bfqq)
2599-
return bfqq->new_bfqq;
2600-
26012588
/*
26022589
* Do not perform queue merging if the device is non
26032590
* rotational and performs internal queueing. In fact, such a
@@ -2652,6 +2639,9 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
26522639
if (bfq_too_late_for_merging(bfqq))
26532640
return NULL;
26542641

2642+
if (bfqq->new_bfqq)
2643+
return bfqq->new_bfqq;
2644+
26552645
if (!io_struct || unlikely(bfqq == &bfqd->oom_bfqq))
26562646
return NULL;
26572647

0 commit comments

Comments
 (0)