]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: get rid of blk-mq default scheduler choice Kconfig entries
authorJens Axboe <axboe@fb.com>
Wed, 22 Feb 2017 20:19:45 +0000 (13:19 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 22 Feb 2017 20:19:45 +0000 (13:19 -0700)
The wording in the entries were poor and not understandable
by even deities. Kill the selection for default block scheduler,
and impose a policy with sane defaults.

Architected-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/Kconfig.iosched
block/blk-mq-sched.c
block/elevator.c

index 0715ce93daef42001407f690912a1b2a437e5a6e..58fc8684788d1f9fe7894c5afefa46c05692bf27 100644 (file)
@@ -69,50 +69,6 @@ config MQ_IOSCHED_DEADLINE
        ---help---
          MQ version of the deadline IO scheduler.
 
-config MQ_IOSCHED_NONE
-       bool
-       default y
-
-choice
-       prompt "Default single-queue blk-mq I/O scheduler"
-       default DEFAULT_SQ_NONE
-       help
-         Select the I/O scheduler which will be used by default for blk-mq
-         managed block devices with a single queue.
-
-       config DEFAULT_SQ_DEADLINE
-               bool "MQ Deadline" if MQ_IOSCHED_DEADLINE=y
-
-       config DEFAULT_SQ_NONE
-               bool "None"
-
-endchoice
-
-config DEFAULT_SQ_IOSCHED
-       string
-       default "mq-deadline" if DEFAULT_SQ_DEADLINE
-       default "none" if DEFAULT_SQ_NONE
-
-choice
-       prompt "Default multi-queue blk-mq I/O scheduler"
-       default DEFAULT_MQ_NONE
-       help
-         Select the I/O scheduler which will be used by default for blk-mq
-         managed block devices with multiple queues.
-
-       config DEFAULT_MQ_DEADLINE
-               bool "MQ Deadline" if MQ_IOSCHED_DEADLINE=y
-
-       config DEFAULT_MQ_NONE
-               bool "None"
-
-endchoice
-
-config DEFAULT_MQ_IOSCHED
-       string
-       default "mq-deadline" if DEFAULT_MQ_DEADLINE
-       default "none" if DEFAULT_MQ_NONE
-
 endmenu
 
 endif
index 9e8d6795a8c1be7eee1c727bb376f209da432ecf..c14f9230824432525b7266d02441399b94629b00 100644 (file)
@@ -498,15 +498,6 @@ int blk_mq_sched_init(struct request_queue *q)
 {
        int ret;
 
-#if defined(CONFIG_DEFAULT_SQ_NONE)
-       if (q->nr_hw_queues == 1)
-               return 0;
-#endif
-#if defined(CONFIG_DEFAULT_MQ_NONE)
-       if (q->nr_hw_queues > 1)
-               return 0;
-#endif
-
        mutex_lock(&q->sysfs_lock);
        ret = elevator_init(q, NULL);
        mutex_unlock(&q->sysfs_lock);
index 699d10f71a2cac3f871bb6879f68f1fc5fafe714..ac1c9f481a9895525b98601cf96837fd5b4015b6 100644 (file)
@@ -220,17 +220,24 @@ int elevator_init(struct request_queue *q, char *name)
        }
 
        if (!e) {
-               if (q->mq_ops && q->nr_hw_queues == 1)
-                       e = elevator_get(CONFIG_DEFAULT_SQ_IOSCHED, false);
-               else if (q->mq_ops)
-                       e = elevator_get(CONFIG_DEFAULT_MQ_IOSCHED, false);
-               else
+               /*
+                * For blk-mq devices, we default to using mq-deadline,
+                * if available, for single queue devices. If deadline
+                * isn't available OR we have multiple queues, default
+                * to "none".
+                */
+               if (q->mq_ops) {
+                       if (q->nr_hw_queues == 1)
+                               e = elevator_get("mq-deadline", false);
+                       if (!e)
+                               return 0;
+               } else
                        e = elevator_get(CONFIG_DEFAULT_IOSCHED, false);
 
                if (!e) {
                        printk(KERN_ERR
                                "Default I/O scheduler not found. " \
-                               "Using noop/none.\n");
+                               "Using noop.\n");
                        e = elevator_get("noop", false);
                }
        }