This is common fair queuing code in elevator layer. This is controlled byconfig option CONFIG_ELV_FAIR_QUEUING. This patch initially only introducesflat fair queuing support where there is only one group, "root group" and allthe tasks belong to root group.

This elevator layer changes are backward compatible. That means any ioschedulerusing old interfaces will continue to work.

This code is essentially the CFQ code for fair queuing. The primary differenceis that flat rounding robin algorithm of CFQ has been replaced with BFQ (WF2Q+).

+config ELV_FAIR_QUEUING+ bool "Elevator Fair Queuing Support"+ default n+ ---help---+ Traditionally only cfq had notion of multiple queues and it did+ fair queuing at its own. With the cgroups and need of controlling+ IO, now even the simple io schedulers like noop, deadline, as will+ have one queue per cgroup and will need hierarchical fair queuing.+ Instead of every io scheduler implementing its own fair queuing+ logic, this option enables fair queuing in elevator layer so that+ other ioschedulers can make use of it.+ If unsure, say N.+ config IOSCHED_NOOP bool default ydiff --git a/block/Makefile b/block/Makefileindex e9fa4dd..94bfc6e 100644--- a/block/Makefile+++ b/block/Makefile@@ -15,3 +15,4 @@ obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o