mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
FROMGIT: blk-mq: Introduce the BLK_MQ_F_NO_SCHED_BY_DEFAULT flag
elevator_get_default() uses the following algorithm to select an I/O scheduler from inside add_disk(): - In case of a single hardware queue or sharing hardware queues across multiple request queues (BLK_MQ_F_TAG_HCTX_SHARED), use mq-deadline. - Otherwise, use 'none'. This is a good choice for most but not for all block drivers. Make it possible to override the selection of mq-deadline with a new flag, namely BLK_MQ_F_NO_SCHED_BY_DEFAULT. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Bug: 194450129 (cherry picked from commit 90b7198001f23ea37d3b46dc631bdaa2357a20b1 git://git.kernel.dk/linux-block/ for-5.15/block) Change-Id: I4fb658957c193f350e74bdb5876c20a8f628fcb1 Signed-off-by: Bart Van Assche <bvanassche@google.com> Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: azrim <mirzaspc@gmail.com>
This commit is contained in:
parent
d31b5f187f
commit
e72aa734dd
@ -973,6 +973,9 @@ int elevator_init_mq(struct request_queue *q)
|
||||
struct elevator_type *e;
|
||||
int err = 0;
|
||||
|
||||
if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
|
||||
return NULL;
|
||||
|
||||
if (q->nr_hw_queues != 1)
|
||||
return 0;
|
||||
|
||||
|
@ -162,7 +162,13 @@ enum {
|
||||
BLK_MQ_F_TAG_SHARED = 1 << 1,
|
||||
BLK_MQ_F_SG_MERGE = 1 << 2,
|
||||
BLK_MQ_F_BLOCKING = 1 << 5,
|
||||
/* Do not allow an I/O scheduler to be configured. */
|
||||
BLK_MQ_F_NO_SCHED = 1 << 6,
|
||||
/*
|
||||
* Select 'none' during queue registration in case of a single hwq
|
||||
* or shared hwqs instead of 'mq-deadline'.
|
||||
*/
|
||||
BLK_MQ_F_NO_SCHED_BY_DEFAULT = 1 << 7,
|
||||
BLK_MQ_F_ALLOC_POLICY_START_BIT = 8,
|
||||
BLK_MQ_F_ALLOC_POLICY_BITS = 1,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user