Re: [PATCH v2] block: BFQ default for single queue devices

Oleksandr Natalenko
2018-10-19T09:26:37Z

Hi.

On 19.10.2018 10:33, Linus Walleij wrote:
>> > + /*
>> > + * Zoned devices must use a deadline scheduler because currently
>> > + * that is the only scheduler respecting zoned writes.
>> > + */
>> > + if (blk_queue_is_zoned(q))
>> > + policy = "mq-deadline";
>> > + else if (IS_ENABLED(CONFIG_IOSCHED_BFQ))
>> > + policy = "bfq";
>> > + else
>> > + policy = "mq-deadline";
>>
>> If more rules will be needed in the future, shall we just add extra
>> ifs,
>> or it would be better to craft some struct/table now + policy search
>> helper?
>
> Let's do it when it happens. Premature optimization is the root
> of all evil ;)

I'd say, this is a matter of code readability, not optimisations. I do
not strongly object against current approach, though.

--
Oleksandr Natalenko (post-factum)