VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: Paolo Valente <paolo.valente@linaro.org> 2021-06-19 16:09:46 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-14 17:06:52 +0200 commit: 833cf2c80aa3142708f62a1cb7893d2bce57839e parent: 30d5c741d111d66391be6ec79a09d590fd18af88
Commit Summary:
block, bfq: avoid delayed merge of async queues
Diffstat:
1 file changed, 7 insertions, 1 deletion
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 2adb1e69c9d2..601ace44080a 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2695,7 +2695,13 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 	 * costly and complicated.
 	 */
 	if (unlikely(!bfqd->nonrot_with_queueing)) {
-		if (bic->stable_merge_bfqq &&
+		/*
+		 * Make sure also that bfqq is sync, because
+		 * bic->stable_merge_bfqq may point to some queue (for
+		 * stable merging) also if bic is associated with a
+		 * sync queue, but this bfqq is async
+		 */
+		if (bfq_bfqq_sync(bfqq) && bic->stable_merge_bfqq &&
 		    !bfq_bfqq_just_created(bfqq) &&
 		    time_is_before_jiffies(bfqq->split_time +
 					  msecs_to_jiffies(200))) {