2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-04 15:41:16 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2006-03-18 12:29:52 -05:00
|
|
|
|
|
|
|
|
|
2009-11-11 13:47:45 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
block: make ioc get/put interface more conventional and fix race on alloction
Ignoring copy_io() during fork, io_context can be allocated from two
places - current_io_context() and set_task_ioprio(). The former is
always called from local task while the latter can be called from
different task. The synchornization between them are peculiar and
dubious.
* current_io_context() doesn't grab task_lock() and assumes that if it
saw %NULL ->io_context, it would stay that way until allocation and
assignment is complete. It has smp_wmb() between alloc/init and
assignment.
* set_task_ioprio() grabs task_lock() for assignment and does
smp_read_barrier_depends() between "ioc = task->io_context" and "if
(ioc)". Unfortunately, this doesn't achieve anything - the latter
is not a dependent load of the former. ie, if ioc itself were being
dereferenced "ioc->xxx", it would mean something (not sure what tho)
but as the code currently stands, the dependent read barrier is
noop.
As only one of the the two test-assignment sequences is task_lock()
protected, the task_lock() can't do much about race between the two.
Nothing prevents current_io_context() and set_task_ioprio() allocating
its own ioc for the same task and overwriting the other's.
Also, set_task_ioprio() can race with exiting task and create a new
ioc after exit_io_context() is finished.
ioc get/put doesn't have any reason to be complex. The only hot path
is accessing the existing ioc of %current, which is simple to achieve
given that ->io_context is never destroyed as long as the task is
alive. All other paths can happily go through task_lock() like all
other task sub structures without impacting anything.
This patch updates ioc get/put so that it becomes more conventional.
* alloc_io_context() is replaced with get_task_io_context(). This is
the only interface which can acquire access to ioc of another task.
On return, the caller has an explicit reference to the object which
should be put using put_io_context() afterwards.
* The functionality of current_io_context() remains the same but when
creating a new ioc, it shares the code path with
get_task_io_context() and always goes through task_lock().
* get_io_context() now means incrementing ref on an ioc which the
caller already has access to (be that an explicit refcnt or implicit
%current one).
* PF_EXITING inhibits creation of new io_context and once
exit_io_context() is finished, it's guaranteed that both ioc
acquisition functions return %NULL.
* All users are updated. Most are trivial but
smp_read_barrier_depends() removal from cfq_get_io_context() needs a
bit of explanation. I suppose the original intention was to ensure
ioc->ioprio is visible when set_task_ioprio() allocates new
io_context and installs it; however, this wouldn't have worked
because set_task_ioprio() doesn't have wmb between init and install.
There are other problems with this which will be fixed in another
patch.
* While at it, use NUMA_NO_NODE instead of -1 for wildcard node
specification.
-v2: Vivek spotted contamination from debug patch. Removed.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-12-14 00:33:38 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
2006-01-06 09:46:02 +01:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-06 09:46:02 +01:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2006-01-06 09:46:02 +01:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2010-02-27 19:45:40 +01:00
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-12-06 20:33:20 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2010-02-22 13:49:24 +01:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-23 14:50:29 +02:00
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 08:31:45 +02:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
2010-02-22 13:49:24 +01:00
|
|
|
|
|
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
2009-10-23 17:14:49 -04:00
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2010-08-23 12:25:03 +02:00
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2009-12-03 12:59:39 -05:00
|
|
|
|
|
|
|
|
|
2010-10-22 09:48:43 +02:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-05-31 10:04:09 +02:00
|
|
|
|
2010-10-22 09:48:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:18 -08:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:56 +02:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
2014-09-08 08:15:20 +09:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
|
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-01 10:12:26 +02:00
|
|
|
|
cfq-iosched: fix ncq detection code
CFQ's detection of queueing devices initially assumes a queuing device
and detects if the queue depth reaches a certain threshold.
However, it will reconsider this choice periodically.
Unfortunately, if device is considered not queuing, CFQ will force a
unit queue depth for some workloads, thus defeating the detection logic.
This leads to poor performance on queuing hardware,
since the idle window remains enabled.
Given this premise, switching to hw_tag = 0 after we have proved at
least once that the device is NCQ capable is not a good choice.
The new detection code starts in an indeterminate state, in which CFQ behaves
as if hw_tag = 1, and then, if for a long observation period we never saw
large depth, we switch to hw_tag = 0, otherwise we stick to hw_tag = 1,
without reconsidering it again.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-26 10:02:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
2006-03-18 13:51:22 -05:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2009-12-06 11:48:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-12-16 17:52:59 -05:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2007-01-19 11:35:30 +11:00
|
|
|
|
|
|
|
|
|
2009-04-07 11:38:31 +02:00
|
|
|
|
2007-01-19 11:35:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-23 17:14:51 -04:00
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-07 11:38:31 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2013-01-09 08:05:12 -08:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:12 -08:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-13 13:11:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:57:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:23 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:48 -05:00
|
|
|
|
2012-04-16 13:57:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:48 -05:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2012-10-03 16:57:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-31 10:04:09 +02:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:39 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:39 -05:00
|
|
|
|
2010-08-23 12:23:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2012-03-05 13:15:28 -08:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2012-03-05 13:15:28 -08:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2010-05-20 23:21:34 +04:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2010-05-20 23:21:34 +04:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2010-08-07 18:20:39 +02:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 20:14:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-06-27 20:14:05 -07:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2014-04-08 09:15:35 -06:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2005-06-27 20:14:05 -07:00
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 09:28:09 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
2009-10-28 09:27:07 +01:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
2011-01-14 08:41:03 +01:00
|
|
|
|
2011-01-19 08:25:02 -07:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-14 08:41:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-19 08:25:02 -07:00
|
|
|
|
2011-01-14 08:41:03 +01:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2009-10-26 22:44:04 +01:00
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-08-24 14:57:54 +02:00
|
|
|
|
2011-05-24 10:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-23 14:50:29 +02:00
|
|
|
|
|
|
|
|
|
2011-08-19 08:34:48 +02:00
|
|
|
|
2009-05-07 22:24:39 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
2006-03-28 08:59:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2009-12-03 12:59:39 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-11-30 09:38:13 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-28 17:14:58 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2014-08-26 20:56:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
2014-08-28 17:14:58 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-26 20:56:36 +09:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2014-08-26 20:56:36 +09:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-30 20:52:47 +01:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-30 22:57:33 -03:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:48 -05:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
2011-03-12 16:54:00 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 16:54:00 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2011-03-12 16:54:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
2011-03-12 16:54:00 +01:00
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
2011-03-12 16:54:00 +01:00
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
2010-08-23 12:23:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-13 10:42:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2013-11-12 19:42:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2011-05-19 15:38:23 -04:00
|
|
|
|
2012-03-05 13:15:14 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-11-12 19:42:14 -08:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 15:38:21 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2011-05-19 15:38:23 -04:00
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2011-05-19 15:38:23 -04:00
|
|
|
|
2012-04-13 13:11:34 -07:00
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
2012-03-05 13:15:14 -08:00
|
|
|
|
2011-05-19 15:38:23 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:47 -05:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2009-12-03 12:59:47 -05:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
hlist: drop the node parameter from iterators
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.
Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.
The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
type T;
expression a,c,d,e;
identifier b;
statement S;
@@
-T b;
<+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
...+>
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 17:06:00 -08:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-08-08 20:11:24 -04:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2013-09-22 12:43:47 -06:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2012-04-16 13:57:26 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
cfq-iosched: implement hierarchy-ready cfq_group charge scaling
Currently, cfqg charges are scaled directly according to cfqg->weight.
Regardless of the number of active cfqgs or the amount of active
weights, a given weight value always scales charge the same way. This
works fine as long as all cfqgs are treated equally regardless of
their positions in the hierarchy, which is what cfq currently
implements. It can't work in hierarchical settings because the
interpretation of a given weight value depends on where the weight is
located in the hierarchy.
This patch reimplements cfqg charge scaling so that it can be used to
support hierarchy properly. The scheme is fairly simple and
light-weight.
* When a cfqg is added to the service tree, v(disktime)weight is
calculated. It walks up the tree to root calculating the fraction
it has in the hierarchy. At each level, the fraction can be
calculated as
cfqg->weight / parent->level_weight
By compounding these, the global fraction of vdisktime the cfqg has
claim to - vfraction - can be determined.
* When the cfqg needs to be charged, the charge is scaled inversely
proportionally to the vfraction.
The new scaling scheme uses the same CFQ_SERVICE_SHIFT for fixed point
representation as before; however, the smallest scaling factor is now
1 (ie. 1 << CFQ_SERVICE_SHIFT). This is different from before where 1
was for CFQ_WEIGHT_DEFAULT and higher weight would result in smaller
scaling factor.
While this shifts the global scale of vdisktime a bit, it doesn't
change the relative relationships among cfqgs and the scheduling
result isn't different.
cfq_group_notify_queue_add uses fixed CFQ_IDLE_DELAY when appending
new cfqg to the service tree. The specific value of CFQ_IDLE_DELAY
didn't have any relevance to vdisktime before and is unlikely to cause
any visible behavior difference now especially as the scale shift
isn't that large.
As the new scheme now makes proper distinction between cfqg->weight
and ->leaf_weight, reverse the weight aliasing for root cfqgs. For
root, both weights are now mapped to ->leaf_weight instead of the
other way around.
Because we're still using cfqg_flat_parent(), this patch shouldn't
change the scheduling behavior in any noticeable way.
v2: Beefed up comments on vfraction as requested by Vivek.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-01-09 08:05:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2014-05-13 12:16:21 -04:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:45 -07:00
|
|
|
|
2013-12-05 12:28:04 -05:00
|
|
|
|
2012-04-01 14:38:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2010-04-21 17:44:16 +02:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2009-12-03 12:59:55 -05:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 20:53:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2009-10-06 20:53:44 +02:00
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2009-10-05 08:49:23 +02:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2009-10-05 08:49:23 +02:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2007-02-05 11:56:25 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2007-02-05 11:56:25 +01:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2006-07-28 09:48:51 +02:00
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-18 20:01:57 +02:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2007-04-18 20:01:57 +02:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2012-10-03 16:57:00 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2012-10-03 16:57:00 -04:00
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2007-04-26 12:53:50 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2011-05-24 10:23:22 +02:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-07 22:24:41 +09:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-05-07 22:24:41 +09:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:14:56 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:14:56 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
2009-05-07 22:24:41 +09:00
|
|
|
|
|
|
|
|
|
2009-04-23 12:14:56 +02:00
|
|
|
|
|
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2011-03-17 16:12:36 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
iosched: prevent aliased requests from starving other I/O
Hi, Jens,
If you recall, I posted an RFC patch for this back in July of last year:
http://lkml.org/lkml/2010/7/13/279
The basic problem is that a process can issue a never-ending stream of
async direct I/Os to the same sector on a device, thus starving out
other I/O in the system (due to the way the alias handling works in both
cfq and deadline). The solution I proposed back then was to start
dispatching from the fifo after a certain number of aliases had been
dispatched. Vivek asked why we had to treat aliases differently at all,
and I never had a good answer. So, I put together a simple patch which
allows aliases to be added to the rb tree (it adds them to the right,
though that doesn't matter as the order isn't guaranteed anyway). I
think this is the preferred solution, as it doesn't break up time slices
in CFQ or batches in deadline. I've tested it, and it does solve the
starvation issue. Let me know what you think.
Cheers,
Jeff
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-06-02 21:19:05 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:37:56 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
iosched: prevent aliased requests from starving other I/O
Hi, Jens,
If you recall, I posted an RFC patch for this back in July of last year:
http://lkml.org/lkml/2010/7/13/279
The basic problem is that a process can issue a never-ending stream of
async direct I/Os to the same sector on a device, thus starving out
other I/O in the system (due to the way the alias handling works in both
cfq and deadline). The solution I proposed back then was to start
dispatching from the fifo after a certain number of aliases had been
dispatched. Vivek asked why we had to treat aliases differently at all,
and I never had a good answer. So, I put together a simple patch which
allows aliases to be added to the rb tree (it adds them to the right,
though that doesn't matter as the order isn't guaranteed anyway). I
think this is the preferred solution, as it doesn't break up time slices
in CFQ or batches in deadline. I've tested it, and it does solve the
starvation issue. Let me know what you think.
Cheers,
Jeff
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-06-02 21:19:05 +02:00
|
|
|
|
2006-10-31 14:21:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 11:53:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 11:53:48 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:37:56 +02:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-24 08:44:49 +01:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-25 15:05:12 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2006-06-01 10:12:26 +02:00
|
|
|
|
2009-05-07 22:24:38 +09:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2006-07-23 01:42:19 +02:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2011-08-23 14:50:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-19 08:34:48 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-07-28 09:23:08 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-08 21:14:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2010-04-08 21:14:23 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
2011-12-16 14:00:22 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-24 16:39:52 +01:00
|
|
|
|
2012-11-06 12:39:51 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2014-02-24 16:39:52 +01:00
|
|
|
|
2009-10-05 11:03:39 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
cfq-iosched: fix next_rq computation
Cfq has a bug in computation of next_rq, that affects transition
between multiple sequential request streams in a single queue
(e.g.: two sequential buffered writers of the same priority),
causing the alternation between the two streams for a transient period.
8,0 1 18737 0.260400660 5312 D W 141653311 + 256
8,0 1 20839 0.273239461 5400 D W 141653567 + 256
8,0 1 20841 0.276343885 5394 D W 142803919 + 256
8,0 1 20843 0.279490878 5394 D W 141668927 + 256
8,0 1 20845 0.292459993 5400 D W 142804175 + 256
8,0 1 20847 0.295537247 5400 D W 141668671 + 256
8,0 1 20849 0.298656337 5400 D W 142804431 + 256
8,0 1 20851 0.311481148 5394 D W 141668415 + 256
8,0 1 20853 0.314421305 5394 D W 142804687 + 256
8,0 1 20855 0.318960112 5400 D W 142804943 + 256
The fix makes sure that the next_rq is computed from the last
dispatched request, and not affected by merging.
8,0 1 37776 4.305161306 0 D W 141738087 + 256
8,0 1 37778 4.308298091 0 D W 141738343 + 256
8,0 1 37780 4.312885190 0 D W 141738599 + 256
8,0 1 37782 4.315933291 0 D W 141738855 + 256
8,0 1 37784 4.319064459 0 D W 141739111 + 256
8,0 1 37786 4.331918431 5672 D W 142803007 + 256
8,0 1 37788 4.334930332 5672 D W 142803263 + 256
8,0 1 37790 4.337902723 5672 D W 142803519 + 256
8,0 1 37792 4.342359774 5672 D W 142803775 + 256
8,0 1 37794 4.345318286 0 D W 142804031 + 256
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-08 17:16:46 +01:00
|
|
|
|
|
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2011-12-16 14:00:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-02 18:32:11 +01:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:39 +01:00
|
|
|
|
block: don't call elevator callbacks for plug merges
Plug merge calls two elevator callbacks outside queue lock -
elevator_allow_merge_fn() and elevator_bio_merged_fn(). Although
attempt_plug_merge() suggests that elevator is guaranteed to be there
through the existing request on the plug list, nothing prevents plug
merge from calling into dying or initializing elevator.
For regular merges, bypass ensures elvpriv count to reach zero, which
in turn prevents merges as all !ELVPRIV requests get REQ_SOFTBARRIER
from forced back insertion. Plug merge doesn't check ELVPRIV, and, as
the requests haven't gone through elevator insertion yet, it doesn't
have SOFTBARRIER set allowing merges on a bypassed queue.
This, for example, leads to the following crash during elevator
switch.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffff813b34e9>] cfq_allow_merge+0x49/0xa0
PGD 112cbc067 PUD 115d5c067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 1
Modules linked in: deadline_iosched
Pid: 819, comm: dd Not tainted 3.3.0-rc2-work+ #76 Bochs Bochs
RIP: 0010:[<ffffffff813b34e9>] [<ffffffff813b34e9>] cfq_allow_merge+0x49/0xa0
RSP: 0018:ffff8801143a38f8 EFLAGS: 00010297
RAX: 0000000000000000 RBX: ffff88011817ce28 RCX: ffff880116eb6cc0
RDX: 0000000000000000 RSI: ffff880118056e20 RDI: ffff8801199512f8
RBP: ffff8801143a3908 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff880118195708
R13: ffff880118052aa0 R14: ffff8801143a3d50 R15: ffff880118195708
FS: 00007f19f82cb700(0000) GS:ffff88011fc80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 0000000112c6a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process dd (pid: 819, threadinfo ffff8801143a2000, task ffff880116eb6cc0)
Stack:
ffff88011817ce28 ffff880118195708 ffff8801143a3928 ffffffff81391bba
ffff88011817ce28 ffff880118195708 ffff8801143a3948 ffffffff81391bf1
ffff88011817ce28 0000000000000000 ffff8801143a39a8 ffffffff81398e3e
Call Trace:
[<ffffffff81391bba>] elv_rq_merge_ok+0x4a/0x60
[<ffffffff81391bf1>] elv_try_merge+0x21/0x40
[<ffffffff81398e3e>] blk_queue_bio+0x8e/0x390
[<ffffffff81396a5a>] generic_make_request+0xca/0x100
[<ffffffff81396b04>] submit_bio+0x74/0x100
[<ffffffff811d45c2>] __blockdev_direct_IO+0x1ce2/0x3450
[<ffffffff811d0dc7>] blkdev_direct_IO+0x57/0x60
[<ffffffff811460b5>] generic_file_aio_read+0x6d5/0x760
[<ffffffff811986b2>] do_sync_read+0xe2/0x120
[<ffffffff81199345>] vfs_read+0xc5/0x180
[<ffffffff81199501>] sys_read+0x51/0x90
[<ffffffff81aeac12>] system_call_fastpath+0x16/0x1b
There are multiple ways to fix this including making plug merge check
ELVPRIV; however,
* Calling into elevator outside queue lock is confusing and
error-prone.
* Requests on plug list aren't known to the elevator. They aren't on
the elevator yet, so there's no elevator specific state to update.
* Given the nature of plug merges - collecting bio's for the same
purpose from the same issuer - elevator specific restrictions aren't
applicable.
So, simply don't call into elevator methods from plug merge by moving
elv_bio_merged() from bio_attempt_*_merge() to blk_queue_bio(), and
using blk_try_merge() in attempt_plug_merge().
This is based on Jens' patch to skip elevator_allow_merge_fn() from
plug merge.
Note that this makes per-cgroup merged stats skip plug merging.
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <4F16F3CA.90904@kernel.dk>
Original-patch-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-02-08 09:19:42 +01:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
block: don't call elevator callbacks for plug merges
Plug merge calls two elevator callbacks outside queue lock -
elevator_allow_merge_fn() and elevator_bio_merged_fn(). Although
attempt_plug_merge() suggests that elevator is guaranteed to be there
through the existing request on the plug list, nothing prevents plug
merge from calling into dying or initializing elevator.
For regular merges, bypass ensures elvpriv count to reach zero, which
in turn prevents merges as all !ELVPRIV requests get REQ_SOFTBARRIER
from forced back insertion. Plug merge doesn't check ELVPRIV, and, as
the requests haven't gone through elevator insertion yet, it doesn't
have SOFTBARRIER set allowing merges on a bypassed queue.
This, for example, leads to the following crash during elevator
switch.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffff813b34e9>] cfq_allow_merge+0x49/0xa0
PGD 112cbc067 PUD 115d5c067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 1
Modules linked in: deadline_iosched
Pid: 819, comm: dd Not tainted 3.3.0-rc2-work+ #76 Bochs Bochs
RIP: 0010:[<ffffffff813b34e9>] [<ffffffff813b34e9>] cfq_allow_merge+0x49/0xa0
RSP: 0018:ffff8801143a38f8 EFLAGS: 00010297
RAX: 0000000000000000 RBX: ffff88011817ce28 RCX: ffff880116eb6cc0
RDX: 0000000000000000 RSI: ffff880118056e20 RDI: ffff8801199512f8
RBP: ffff8801143a3908 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff880118195708
R13: ffff880118052aa0 R14: ffff8801143a3d50 R15: ffff880118195708
FS: 00007f19f82cb700(0000) GS:ffff88011fc80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 0000000112c6a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process dd (pid: 819, threadinfo ffff8801143a2000, task ffff880116eb6cc0)
Stack:
ffff88011817ce28 ffff880118195708 ffff8801143a3928 ffffffff81391bba
ffff88011817ce28 ffff880118195708 ffff8801143a3948 ffffffff81391bf1
ffff88011817ce28 0000000000000000 ffff8801143a39a8 ffffffff81398e3e
Call Trace:
[<ffffffff81391bba>] elv_rq_merge_ok+0x4a/0x60
[<ffffffff81391bf1>] elv_try_merge+0x21/0x40
[<ffffffff81398e3e>] blk_queue_bio+0x8e/0x390
[<ffffffff81396a5a>] generic_make_request+0xca/0x100
[<ffffffff81396b04>] submit_bio+0x74/0x100
[<ffffffff811d45c2>] __blockdev_direct_IO+0x1ce2/0x3450
[<ffffffff811d0dc7>] blkdev_direct_IO+0x57/0x60
[<ffffffff811460b5>] generic_file_aio_read+0x6d5/0x760
[<ffffffff811986b2>] do_sync_read+0xe2/0x120
[<ffffffff81199345>] vfs_read+0xc5/0x180
[<ffffffff81199501>] sys_read+0x51/0x90
[<ffffffff81aeac12>] system_call_fastpath+0x16/0x1b
There are multiple ways to fix this including making plug merge check
ELVPRIV; however,
* Calling into elevator outside queue lock is confusing and
error-prone.
* Requests on plug list aren't known to the elevator. They aren't on
the elevator yet, so there's no elevator specific state to update.
* Given the nature of plug merges - collecting bio's for the same
purpose from the same issuer - elevator specific restrictions aren't
applicable.
So, simply don't call into elevator methods from plug merge by moving
elv_bio_merged() from bio_attempt_*_merge() to blk_queue_bio(), and
using blk_try_merge() in attempt_plug_merge().
This is based on Jens' patch to skip elevator_allow_merge_fn() from
plug merge.
Note that this makes per-cgroup merged stats skip plug merging.
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <4F16F3CA.90904@kernel.dk>
Original-patch-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-02-08 09:19:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-22 09:38:53 +01:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
|
|
|
|
|
2010-04-08 21:15:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2010-04-08 21:15:35 -07:00
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2011-03-23 08:25:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2010-04-08 21:15:35 -07:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2007-04-23 08:25:00 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2011-01-14 08:41:03 +01:00
|
|
|
|
|
|
|
|
|
2011-01-19 08:25:02 -07:00
|
|
|
|
2011-01-14 08:41:03 +01:00
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-07 07:51:30 +01:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2009-11-04 08:54:55 +01:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-07 22:24:39 +09:00
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2009-05-07 22:24:39 +09:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:49 -04:00
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-23 12:19:38 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2009-05-07 22:24:41 +09:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:51 -04:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-25 15:45:57 +01:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 08:54:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2009-10-27 19:16:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
2010-08-23 12:23:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-04 13:12:06 +01:00
|
|
|
|
|
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
cfq-iosched: enable idling for last queue on priority class
cfq can disable idling for queues in various circumstances.
When workloads of different priorities are competing, if the higher
priority queue has idling disabled, lower priority queues may steal
its disk share. For example, in a scenario with an RT process
performing seeky reads vs a BE process performing sequential reads,
on an NCQ enabled hardware, with low_latency unset,
the RT process will dispatch only the few pending requests every full
slice of service for the BE process.
The patch solves this issue by always performing idle on the last
queue at a given priority class > idle. If the same process, or one
that can pre-empt it (so at the same priority or higher), submits a
new request within the idle window, the lower priority queue won't
dispatch, saving the disk bandwidth for higher priority ones.
Note: this doesn't touch the non_rotational + NCQ case (no hardware
to test if this is a benefit in that case).
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:11 +01:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-01-19 11:59:30 +11:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2008-09-24 13:03:33 +02:00
|
|
|
|
2008-09-25 11:37:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-24 13:03:33 +02:00
|
|
|
|
2008-09-25 11:37:50 +02:00
|
|
|
|
2008-09-24 13:03:33 +02:00
|
|
|
|
|
|
|
|
|
2006-06-21 09:36:18 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2012-03-05 13:15:26 -08:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2009-10-08 08:43:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
|
|
|
|
|
2011-06-13 10:42:49 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2009-10-08 08:43:32 +02:00
|
|
|
|
2010-03-25 15:45:03 +01:00
|
|
|
|
2009-10-08 08:43:32 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2006-02-28 09:35:11 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-04-23 08:33:33 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2009-09-11 17:08:59 +02:00
|
|
|
|
2006-07-13 12:37:56 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2006-07-13 12:37:56 +02:00
|
|
|
|
2007-04-23 08:33:33 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2010-08-23 12:25:03 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-10-05 11:03:39 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-19 12:01:16 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
2014-02-24 16:39:52 +01:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-10-05 11:03:39 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-24 10:23:21 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
cfq: Don't allow queue merges for queues that have no process references
Hi,
A user reported a kernel bug when running a particular program that did
the following:
created 32 threads
- each thread took a mutex, grabbed a global offset, added a buffer size
to that offset, released the lock
- read from the given offset in the file
- created a new thread to do the same
- exited
The result is that cfq's close cooperator logic would trigger, as the
threads were issuing I/O within the mean seek distance of one another.
This workload managed to routinely trigger a use after free bug when
walking the list of merge candidates for a particular cfqq
(cfqq->new_cfqq). The logic used for merging queues looks like this:
static void cfq_setup_merge(struct cfq_queue *cfqq, struct cfq_queue *new_cfqq)
{
int process_refs, new_process_refs;
struct cfq_queue *__cfqq;
/* Avoid a circular list and skip interim queue merges */
while ((__cfqq = new_cfqq->new_cfqq)) {
if (__cfqq == cfqq)
return;
new_cfqq = __cfqq;
}
process_refs = cfqq_process_refs(cfqq);
/*
* If the process for the cfqq has gone away, there is no
* sense in merging the queues.
*/
if (process_refs == 0)
return;
/*
* Merge in the direction of the lesser amount of work.
*/
new_process_refs = cfqq_process_refs(new_cfqq);
if (new_process_refs >= process_refs) {
cfqq->new_cfqq = new_cfqq;
atomic_add(process_refs, &new_cfqq->ref);
} else {
new_cfqq->new_cfqq = cfqq;
atomic_add(new_process_refs, &cfqq->ref);
}
}
When a merge candidate is found, we add the process references for the
queue with less references to the queue with more. The actual merging
of queues happens when a new request is issued for a given cfqq. In the
case of the test program, it only does a single pread call to read in
1MB, so the actual merge never happens.
Normally, this is fine, as when the queue exits, we simply drop the
references we took on the other cfqqs in the merge chain:
/*
* If this queue was scheduled to merge with another queue, be
* sure to drop the reference taken on that queue (and others in
* the merge chain). See cfq_setup_merge and cfq_merge_cfqqs.
*/
__cfqq = cfqq->new_cfqq;
while (__cfqq) {
if (__cfqq == cfqq) {
WARN(1, "cfqq->new_cfqq loop detected\n");
break;
}
next = __cfqq->new_cfqq;
cfq_put_queue(__cfqq);
__cfqq = next;
}
However, there is a hole in this logic. Consider the following (and
keep in mind that each I/O keeps a reference to the cfqq):
q1->new_cfqq = q2 // q2 now has 2 process references
q3->new_cfqq = q2 // q2 now has 3 process references
// the process associated with q2 exits
// q2 now has 2 process references
// queue 1 exits, drops its reference on q2
// q2 now has 1 process reference
// q3 exits, so has 0 process references, and hence drops its references
// to q2, which leaves q2 also with 0 process references
q4 comes along and wants to merge with q3
q3->new_cfqq still points at q2! We follow that link and end up at an
already freed cfqq.
So, the fix is to not follow a merge chain if the top-most queue does
not have a process reference, otherwise any queue in the chain could be
already freed. I also changed the logic to disallow merging with a
queue that does not have any process references. Previously, we did
this check for one of the merge candidates, but not the other. That
doesn't really make sense.
Without the attached patch, my system would BUG within a couple of
seconds of running the reproducer program. With the patch applied, my
system ran the program for over an hour without issues.
This addresses the following bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=16217
Thanks a ton to Phil Carns for providing the bug report and an excellent
reproducer.
[ Note for stable: this applies to 2.6.32/33/34 ].
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reported-by: Phil Carns <carns@mcs.anl.gov>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-17 10:19:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq: Don't allow queue merges for queues that have no process references
Hi,
A user reported a kernel bug when running a particular program that did
the following:
created 32 threads
- each thread took a mutex, grabbed a global offset, added a buffer size
to that offset, released the lock
- read from the given offset in the file
- created a new thread to do the same
- exited
The result is that cfq's close cooperator logic would trigger, as the
threads were issuing I/O within the mean seek distance of one another.
This workload managed to routinely trigger a use after free bug when
walking the list of merge candidates for a particular cfqq
(cfqq->new_cfqq). The logic used for merging queues looks like this:
static void cfq_setup_merge(struct cfq_queue *cfqq, struct cfq_queue *new_cfqq)
{
int process_refs, new_process_refs;
struct cfq_queue *__cfqq;
/* Avoid a circular list and skip interim queue merges */
while ((__cfqq = new_cfqq->new_cfqq)) {
if (__cfqq == cfqq)
return;
new_cfqq = __cfqq;
}
process_refs = cfqq_process_refs(cfqq);
/*
* If the process for the cfqq has gone away, there is no
* sense in merging the queues.
*/
if (process_refs == 0)
return;
/*
* Merge in the direction of the lesser amount of work.
*/
new_process_refs = cfqq_process_refs(new_cfqq);
if (new_process_refs >= process_refs) {
cfqq->new_cfqq = new_cfqq;
atomic_add(process_refs, &new_cfqq->ref);
} else {
new_cfqq->new_cfqq = cfqq;
atomic_add(new_process_refs, &cfqq->ref);
}
}
When a merge candidate is found, we add the process references for the
queue with less references to the queue with more. The actual merging
of queues happens when a new request is issued for a given cfqq. In the
case of the test program, it only does a single pread call to read in
1MB, so the actual merge never happens.
Normally, this is fine, as when the queue exits, we simply drop the
references we took on the other cfqqs in the merge chain:
/*
* If this queue was scheduled to merge with another queue, be
* sure to drop the reference taken on that queue (and others in
* the merge chain). See cfq_setup_merge and cfq_merge_cfqqs.
*/
__cfqq = cfqq->new_cfqq;
while (__cfqq) {
if (__cfqq == cfqq) {
WARN(1, "cfqq->new_cfqq loop detected\n");
break;
}
next = __cfqq->new_cfqq;
cfq_put_queue(__cfqq);
__cfqq = next;
}
However, there is a hole in this logic. Consider the following (and
keep in mind that each I/O keeps a reference to the cfqq):
q1->new_cfqq = q2 // q2 now has 2 process references
q3->new_cfqq = q2 // q2 now has 3 process references
// the process associated with q2 exits
// q2 now has 2 process references
// queue 1 exits, drops its reference on q2
// q2 now has 1 process reference
// q3 exits, so has 0 process references, and hence drops its references
// to q2, which leaves q2 also with 0 process references
q4 comes along and wants to merge with q3
q3->new_cfqq still points at q2! We follow that link and end up at an
already freed cfqq.
So, the fix is to not follow a merge chain if the top-most queue does
not have a process reference, otherwise any queue in the chain could be
already freed. I also changed the logic to disallow merging with a
queue that does not have any process references. Previously, we did
this check for one of the merge candidates, but not the other. That
doesn't really make sense.
Without the attached patch, my system would BUG within a couple of
seconds of running the reproducer program. With the patch applied, my
system ran the program for over an hour without issues.
This addresses the following bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=16217
Thanks a ton to Phil Carns for providing the bug report and an excellent
reproducer.
[ Note for stable: this applies to 2.6.32/33/34 ].
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reported-by: Phil Carns <carns@mcs.anl.gov>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-17 10:19:11 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq: Don't allow queue merges for queues that have no process references
Hi,
A user reported a kernel bug when running a particular program that did
the following:
created 32 threads
- each thread took a mutex, grabbed a global offset, added a buffer size
to that offset, released the lock
- read from the given offset in the file
- created a new thread to do the same
- exited
The result is that cfq's close cooperator logic would trigger, as the
threads were issuing I/O within the mean seek distance of one another.
This workload managed to routinely trigger a use after free bug when
walking the list of merge candidates for a particular cfqq
(cfqq->new_cfqq). The logic used for merging queues looks like this:
static void cfq_setup_merge(struct cfq_queue *cfqq, struct cfq_queue *new_cfqq)
{
int process_refs, new_process_refs;
struct cfq_queue *__cfqq;
/* Avoid a circular list and skip interim queue merges */
while ((__cfqq = new_cfqq->new_cfqq)) {
if (__cfqq == cfqq)
return;
new_cfqq = __cfqq;
}
process_refs = cfqq_process_refs(cfqq);
/*
* If the process for the cfqq has gone away, there is no
* sense in merging the queues.
*/
if (process_refs == 0)
return;
/*
* Merge in the direction of the lesser amount of work.
*/
new_process_refs = cfqq_process_refs(new_cfqq);
if (new_process_refs >= process_refs) {
cfqq->new_cfqq = new_cfqq;
atomic_add(process_refs, &new_cfqq->ref);
} else {
new_cfqq->new_cfqq = cfqq;
atomic_add(new_process_refs, &cfqq->ref);
}
}
When a merge candidate is found, we add the process references for the
queue with less references to the queue with more. The actual merging
of queues happens when a new request is issued for a given cfqq. In the
case of the test program, it only does a single pread call to read in
1MB, so the actual merge never happens.
Normally, this is fine, as when the queue exits, we simply drop the
references we took on the other cfqqs in the merge chain:
/*
* If this queue was scheduled to merge with another queue, be
* sure to drop the reference taken on that queue (and others in
* the merge chain). See cfq_setup_merge and cfq_merge_cfqqs.
*/
__cfqq = cfqq->new_cfqq;
while (__cfqq) {
if (__cfqq == cfqq) {
WARN(1, "cfqq->new_cfqq loop detected\n");
break;
}
next = __cfqq->new_cfqq;
cfq_put_queue(__cfqq);
__cfqq = next;
}
However, there is a hole in this logic. Consider the following (and
keep in mind that each I/O keeps a reference to the cfqq):
q1->new_cfqq = q2 // q2 now has 2 process references
q3->new_cfqq = q2 // q2 now has 3 process references
// the process associated with q2 exits
// q2 now has 2 process references
// queue 1 exits, drops its reference on q2
// q2 now has 1 process reference
// q3 exits, so has 0 process references, and hence drops its references
// to q2, which leaves q2 also with 0 process references
q4 comes along and wants to merge with q3
q3->new_cfqq still points at q2! We follow that link and end up at an
already freed cfqq.
So, the fix is to not follow a merge chain if the top-most queue does
not have a process reference, otherwise any queue in the chain could be
already freed. I also changed the logic to disallow merging with a
queue that does not have any process references. Previously, we did
this check for one of the merge candidates, but not the other. That
doesn't really make sense.
Without the attached patch, my system would BUG within a couple of
seconds of running the reproducer program. With the patch applied, my
system ran the program for over an hour without issues.
This addresses the following bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=16217
Thanks a ton to Phil Carns for providing the bug report and an excellent
reproducer.
[ Note for stable: this applies to 2.6.32/33/34 ].
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reported-by: Phil Carns <carns@mcs.anl.gov>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-17 10:19:11 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:59 -04:00
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-16 17:52:59 -05:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:59 -04:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2010-12-13 14:32:22 +01:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
2009-12-16 17:52:59 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-12-16 17:52:59 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
2010-12-13 14:32:22 +01:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2012-10-03 16:56:59 -04:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:56 -04:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:54 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-25 15:45:03 +01:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:45 -05:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-15 10:08:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:59 -04:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-11-10 08:49:19 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-10 19:25:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
2009-12-10 19:25:41 +01:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-06-21 09:36:18 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-10-23 17:14:51 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: don't idle if a deep seek queue is slow
If a deep seek queue slowly deliver requests but disk is much faster, idle
for the queue just wastes disk throughput. If the queue delevers all requests
before half its slice is used, the patch disable idle for it.
In my test, application delivers 32 requests one time, the disk can accept
128 requests at maxium and disk is fast. without the patch, the throughput
is just around 30m/s, while with it, the speed is about 80m/s. The disk is
a SSD, but is detected as a rotational disk. I can configure it as SSD, but
I thought the deep seek queue logic should be fixed too, for example,
considering a fast raid.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-11-08 15:01:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
cfq-iosched: fairness for sync no-idle queues
Currently no-idle queues in cfq are not serviced fairly:
even if they can only dispatch a small number of requests at a time,
they have to compete with idling queues to be serviced, experiencing
large latencies.
We should notice, instead, that no-idle queues are the ones that would
benefit most from having low latency, in fact they are any of:
* processes with large think times (e.g. interactive ones like file
managers)
* seeky (e.g. programs faulting in their code at startup)
* or marked as no-idle from upper levels, to improve latencies of those
requests.
This patch improves the fairness and latency for those queues, by:
* separating sync idle, sync no-idle and async queues in separate
service_trees, for each priority
* service all no-idle queues together
* and idling when the last no-idle queue has been serviced, to
anticipate for more no-idle work
* the timeslices allotted for idle and no-idle service_trees are
computed proportionally to the number of processes in each set.
Servicing all no-idle queues together should have a performance boost
for NCQ-capable drives, without compromising fairness.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-10-26 22:45:29 +01:00
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2008-01-28 13:19:43 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 12:54:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2005-11-10 08:49:19 +01:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2007-04-20 14:27:50 +02:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2010-04-09 09:29:57 +02:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2010-04-09 09:29:57 +02:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
2010-04-09 09:29:57 +02:00
|
|
|
|
2005-11-10 08:49:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-12 15:29:30 +02:00
|
|
|
|
2005-11-10 08:49:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
|
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
2010-11-08 15:01:02 +01:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-07-03 12:57:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2009-07-03 12:57:48 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-23 08:33:33 +02:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2007-04-23 08:33:33 +02:00
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
2011-03-23 08:30:34 +01:00
|
|
|
|
|
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-23 08:30:34 +01:00
|
|
|
|
|
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2007-01-19 12:11:44 +11:00
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2009-12-03 12:58:05 +01:00
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2011-03-07 09:26:29 +01:00
|
|
|
|
2010-03-01 09:20:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-03 16:26:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
2009-12-06 11:48:52 +01:00
|
|
|
|
2009-10-03 16:26:03 +02:00
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2009-10-03 19:46:03 +02:00
|
|
|
|
2009-10-04 20:36:19 +02:00
|
|
|
|
|
|
|
|
|
2009-10-03 16:26:03 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-03 16:26:03 +02:00
|
|
|
|
|
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
2009-10-06 20:49:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
2009-04-07 11:38:31 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
|
|
|
|
|
2009-09-01 10:06:42 +02:00
|
|
|
|
2009-04-07 08:51:19 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-12-03 12:59:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-03-01 15:05:08 -05:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-12-03 12:59:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-19 12:09:53 +11:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2007-01-19 12:09:53 +11:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-12-03 12:59:40 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-05-25 10:16:53 +02:00
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-25 10:16:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2011-12-14 00:33:38 +01:00
|
|
|
|
2008-04-10 08:28:01 +02:00
|
|
|
|
2009-04-08 10:58:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
|
|
|
|
|
2009-04-08 10:58:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-07 09:51:23 +02:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
2008-05-07 09:51:23 +02:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2010-05-20 23:21:34 +04:00
|
|
|
|
2006-03-18 13:25:24 -05:00
|
|
|
|
2006-06-14 09:10:45 +02:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
2009-04-08 10:58:57 +02:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
|
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2009-04-08 10:58:57 +02:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2009-04-08 10:58:57 +02:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2009-06-26 10:44:34 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2009-06-26 10:44:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2009-06-26 10:44:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
2010-05-20 23:21:34 +04:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2014-09-08 08:15:20 +09:00
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2014-09-08 08:15:20 +09:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-08 08:15:20 +09:00
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
2014-09-08 08:15:20 +09:00
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:51 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:01 -08:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-03-05 13:15:06 -08:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2012-03-05 13:15:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-17 04:03:29 -07:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
2007-07-17 04:03:29 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
cfq: fix lock imbalance with failed allocations
While stress-running very-small container scenarios with the Kernel Memory
Controller, I've run into a lockdep-detected lock imbalance in
cfq-iosched.c.
I'll apologize beforehand for not posting a backlog: I didn't anticipate
it would be so hard to reproduce, so I didn't save my serial output and
went directly on debugging. Turns out that it did not happen again in
more than 20 runs, making it a quite rare pattern.
But here is my analysis:
When we are in very low-memory situations, we will arrive at
cfq_find_alloc_queue and may not find a queue, having to resort to the oom
queue, in an rcu-locked condition:
if (!cfqq || cfqq == &cfqd->oom_cfqq)
[ ... ]
Next, we will release the rcu lock, and try to allocate a queue, retrying
if we succeed:
rcu_read_unlock();
spin_unlock_irq(cfqd->queue->queue_lock);
new_cfqq = kmem_cache_alloc_node(cfq_pool,
gfp_mask | __GFP_ZERO,
cfqd->queue->node);
spin_lock_irq(cfqd->queue->queue_lock);
if (new_cfqq)
goto retry;
We are unlocked at this point, but it should be fine, since we will
reacquire the rcu_read_lock when we retry.
Except of course, that we may not retry: the allocation may very well fail
and we'll keep on going through the flow:
The next branch is:
if (cfqq) {
[ ... ]
} else
cfqq = &cfqd->oom_cfqq;
And right before exiting, we'll issue rcu_read_unlock().
Being already unlocked, this is the likely source of our imbalance. Since
cfqq is either already NULL or made NULL in the first statement of the
outter branch, the only viable alternative here seems to be to return the
oom queue right away in case of allocation failure.
Please review the following patch and apply if you agree with my analysis.
Signed-off-by: Glauber Costa <glommer@parallels.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-02-21 15:16:41 -08:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-07-17 04:03:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-17 16:15:10 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2009-12-03 12:59:38 -05:00
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2012-03-05 13:15:28 -08:00
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2007-07-10 13:43:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2009-10-23 17:14:49 -04:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
2010-02-27 19:45:40 +01:00
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2010-02-27 19:45:39 +01:00
|
|
|
|
2010-02-27 19:45:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 13:03:44 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2007-04-19 14:32:26 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-19 14:32:26 +02:00
|
|
|
|
|
|
|
|
|
2008-06-26 13:49:33 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-20 15:24:50 +02:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:26 -08:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-02-14 19:59:49 +01:00
|
|
|
|
2010-01-06 18:58:20 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-23 01:42:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-02-14 19:59:49 +01:00
|
|
|
|
2009-12-03 12:59:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2009-12-03 12:59:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-19 08:34:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-23 14:50:29 +02:00
|
|
|
|
2011-08-19 08:34:48 +02:00
|
|
|
|
|
|
|
|
|
2009-01-30 12:46:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2009-01-30 12:46:41 +01:00
|
|
|
|
2010-11-08 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-14 19:59:49 +01:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-02-14 19:59:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-19 08:03:04 +01:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2007-02-14 19:59:49 +01:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-19 09:20:09 +01:00
|
|
|
|
|
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2012-01-19 09:20:09 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-01-14 08:41:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-19 09:20:09 +01:00
|
|
|
|
2012-10-03 16:56:57 -04:00
|
|
|
|
2011-01-14 08:41:02 +01:00
|
|
|
|
2006-07-19 20:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-19 12:03:34 +02:00
|
|
|
|
|
|
|
|
|
2011-03-22 21:26:49 +01:00
|
|
|
|
2011-03-23 08:25:44 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2006-06-01 10:09:56 +02:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
2011-08-23 14:50:29 +02:00
|
|
|
|
|
|
|
|
|
2006-07-23 01:42:19 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2009-10-23 17:14:49 -04:00
|
|
|
|
2005-08-24 14:57:54 +02:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:49 -04:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-07 11:38:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-14 14:18:16 +02:00
|
|
|
|
|
|
|
|
|
2009-04-15 12:12:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-04-14 14:18:16 +02:00
|
|
|
|
2009-04-15 12:12:46 +02:00
|
|
|
|
|
|
|
|
|
2010-04-08 21:15:35 -07:00
|
|
|
|
2009-12-10 09:38:39 +01:00
|
|
|
|
2011-04-18 11:41:33 +02:00
|
|
|
|
2010-04-13 19:59:17 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2009-12-03 12:59:37 -05:00
|
|
|
|
2010-04-13 19:59:17 +02:00
|
|
|
|
2009-04-14 14:18:16 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-30 12:46:41 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2011-04-18 11:41:33 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-02-24 16:39:52 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-10-26 22:44:33 +01:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-27 08:46:23 +01:00
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
|
|
|
|
|
cfq-iosched: fix ncq detection code
CFQ's detection of queueing devices initially assumes a queuing device
and detects if the queue depth reaches a certain threshold.
However, it will reconsider this choice periodically.
Unfortunately, if device is considered not queuing, CFQ will force a
unit queue depth for some workloads, thus defeating the detection logic.
This leads to poor performance on queuing hardware,
since the idle window remains enabled.
Given this premise, switching to hw_tag = 0 after we have proved at
least once that the device is NCQ capable is not a good choice.
The new detection code starts in an indeterminate state, in which CFQ behaves
as if hw_tag = 1, and then, if for a long observation period we never saw
large depth, we switch to hw_tag = 0, otherwise we stick to hw_tag = 1,
without reconsidering it again.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-26 10:02:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
2009-10-27 08:46:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2009-10-27 08:46:23 +01:00
|
|
|
|
|
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfq-iosched: fix ncq detection code
CFQ's detection of queueing devices initially assumes a queuing device
and detects if the queue depth reaches a certain threshold.
However, it will reconsider this choice periodically.
Unfortunately, if device is considered not queuing, CFQ will force a
unit queue depth for some workloads, thus defeating the detection logic.
This leads to poor performance on queuing hardware,
since the idle window remains enabled.
Given this premise, switching to hw_tag = 0 after we have proved at
least once that the device is NCQ capable is not a good choice.
The new detection code starts in an indeterminate state, in which CFQ behaves
as if hw_tag = 1, and then, if for a long observation period we never saw
large depth, we switch to hw_tag = 0, otherwise we stick to hw_tag = 1,
without reconsidering it again.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-26 10:02:57 +01:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
2011-02-09 14:20:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2006-07-13 12:37:56 +02:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2010-08-07 18:17:56 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-08-26 15:52:36 +02:00
|
|
|
|
|
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2007-04-23 08:33:33 +02:00
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
2011-07-12 14:24:35 +02:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
|
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
2011-07-12 14:24:55 +02:00
|
|
|
|
2012-10-03 16:56:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-06 11:48:52 +01:00
|
|
|
|
|
|
|
|
|
2009-10-03 15:21:27 +02:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2011-07-12 14:24:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
|
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2009-12-08 17:52:58 -05:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
2010-03-25 15:45:03 +01:00
|
|
|
|
2009-12-03 12:59:53 -05:00
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 12:15:11 +02:00
|
|
|
|
2008-01-28 11:38:15 +01:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
|
|
|
|
|
2010-09-20 15:24:50 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2007-04-25 12:44:27 +02:00
|
|
|
|
2010-02-28 19:45:05 +01:00
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-08-11 08:26:11 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 08:44:49 +01:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-08 10:56:08 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-07-22 16:48:31 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-01 10:42:33 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-04-21 17:44:16 +02:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
|
|
|
|
|
2010-04-21 17:44:16 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:51 -04:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-25 10:16:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2012-03-05 13:15:27 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-10-07 20:02:57 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:38 +01:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2012-03-19 15:10:58 -07:00
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-07-09 22:13:16 +02:00
|
|
|
|
2012-03-19 15:10:57 -07:00
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-05 13:11:45 +01:00
|
|
|
|
2009-10-23 17:14:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-23 17:14:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 12:29:51 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2011-03-01 15:04:39 -05:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2011-12-14 00:33:41 +01:00
|
|
|
|
2012-03-05 13:15:15 -08:00
|
|
|
|
2011-12-14 00:33:38 +01:00
|
|
|
|
2006-07-13 12:39:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-11-22 14:55:48 +00:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2006-11-22 14:55:48 +00:00
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-04-15 12:11:10 +02:00
|
|
|
|
2011-04-18 11:41:33 +02:00
|
|
|
|
2009-04-15 12:11:10 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-19 12:06:33 +11:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2008-05-30 12:23:07 +02:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
2007-01-19 12:06:33 +11:00
|
|
|
|
|
|
|
|
|
2009-04-07 11:38:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-19 11:51:58 +11:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-16 11:23:00 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-07 08:56:14 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-11-26 10:02:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-05 08:58:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
|
|
|
|
|
2008-10-31 10:05:07 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2007-07-24 09:28:11 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2006-03-28 08:59:01 +02:00
|
|
|
|
2006-03-18 13:51:22 -05:00
|
|
|
|
2006-03-28 08:59:01 +02:00
|
|
|
|
2006-03-18 13:51:22 -05:00
|
|
|
|
2010-04-26 19:25:11 +02:00
|
|
|
|
2006-03-28 08:59:01 +02:00
|
|
|
|
2007-07-20 10:06:38 +02:00
|
|
|
|
2012-03-05 13:15:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-18 12:05:37 -05:00
|
|
|
|
|
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2011-05-23 10:02:19 +02:00
|
|
|
|
2011-05-19 15:38:22 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:14:57 -08:00
|
|
|
|
2010-05-20 23:21:41 +04:00
|
|
|
|
2013-08-29 15:21:42 -07:00
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2009-12-03 12:59:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2009-12-03 12:59:46 -05:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
|
|
|
|
|
2011-05-19 15:38:28 -04:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
|
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
|
|
|
|
|
2011-05-19 15:38:28 -04:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:38:44 -07:00
|
|
|
|
2013-01-09 08:05:10 -08:00
|
|
|
|
2011-05-19 15:38:28 -04:00
|
|
|
|
2009-04-23 12:13:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 09:34:12 +02:00
|
|
|
|
|
|
|
|
|
2011-01-07 08:46:59 +01:00
|
|
|
|
2012-03-05 13:15:15 -08:00
|
|
|
|
|
|
|
|
|
2012-03-05 13:15:05 -08:00
|
|
|
|
2012-03-23 14:02:53 +01:00
|
|
|
|
2012-03-05 13:15:15 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-05 08:52:35 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
cfq-iosched: fix ncq detection code
CFQ's detection of queueing devices initially assumes a queuing device
and detects if the queue depth reaches a certain threshold.
However, it will reconsider this choice periodically.
Unfortunately, if device is considered not queuing, CFQ will force a
unit queue depth for some workloads, thus defeating the detection logic.
This leads to poor performance on queuing hardware,
since the idle window remains enabled.
Given this premise, switching to hw_tag = 0 after we have proved at
least once that the device is NCQ capable is not a good choice.
The new detection code starts in an indeterminate state, in which CFQ behaves
as if hw_tag = 1, and then, if for a long observation period we never saw
large depth, we switch to hw_tag = 0, otherwise we stick to hw_tag = 1,
without reconsidering it again.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-26 10:02:57 +01:00
|
|
|
|
2009-12-09 20:56:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-06 11:48:52 +01:00
|
|
|
|
2012-03-05 13:14:57 -08:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-03 13:25:24 +02:00
|
|
|
|
2012-04-13 13:11:33 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-28 12:38:34 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-31 10:05:07 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-18 18:35:43 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2006-03-18 22:27:18 -05:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-31 10:05:07 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-18 18:35:43 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-18 22:27:18 -05:00
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
2008-01-31 13:08:54 +01:00
|
|
|
|
|
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-18 22:27:18 -05:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:56:24 +02:00
|
|
|
|
2006-03-18 22:27:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
2009-10-03 19:42:18 +02:00
|
|
|
|
2012-04-01 14:33:39 -07:00
|
|
|
|
2006-03-18 22:27:18 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-20 11:04:12 +01:00
|
|
|
|
2010-04-08 21:14:23 -07:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-20 16:42:29 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-13 12:33:14 +02:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
|
|
|
|
|
2006-03-18 18:35:43 -05:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-04 10:36:42 -05:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-16 13:57:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-09 08:05:13 -08:00
|
|
|
|
2012-04-16 13:57:27 -07:00
|
|
|
|
2009-12-04 10:36:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
|
|
|
|
|
2005-06-27 10:55:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 12:24:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
|
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
2012-06-04 10:01:38 +02:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
|
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
|
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2007-12-12 18:51:56 +01:00
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
2012-04-13 13:11:28 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
2012-04-16 13:57:25 -07:00
|
|
|
|
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
cfq may be built w/ or w/o blkcg support depending on
CONFIG_CFQ_CGROUP_IOSCHED. If blkcg support is disabled, most of
related code is ifdef'd out but some part is left dangling -
blkcg_policy_cfq is left zero-filled and blkcg_policy_[un]register()
calls are made on it.
Feeding zero filled policy to blkcg_policy_register() is incorrect and
triggers the following WARN_ON() if CONFIG_BLK_CGROUP &&
!CONFIG_CFQ_GROUP_IOSCHED.
------------[ cut here ]------------
WARNING: at block/blk-cgroup.c:867
Modules linked in:
Modules linked in:
CPU: 3 Not tainted 3.4.0-09547-gfb21aff #1
Process swapper/0 (pid: 1, task: 000000003ff80000, ksp: 000000003ff7f8b8)
Krnl PSW : 0704100180000000 00000000003d76ca (blkcg_policy_register+0xca/0xe0)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
Krnl GPRS: 0000000000000000 00000000014b85ec 00000000014b85b0 0000000000000000
000000000096fb60 0000000000000000 00000000009a8e78 0000000000000048
000000000099c070 0000000000b6f000 0000000000000000 000000000099c0b8
00000000014b85b0 0000000000667580 000000003ff7fd98 000000003ff7fd70
Krnl Code: 00000000003d76be: a7280001 lhi %r2,1
00000000003d76c2: a7f4ffdf brc 15,3d7680
#00000000003d76c6: a7f40001 brc 15,3d76c8
>00000000003d76ca: a7c8ffea lhi %r12,-22
00000000003d76ce: a7f4ffce brc 15,3d766a
00000000003d76d2: a7f40001 brc 15,3d76d4
00000000003d76d6: a7c80000 lhi %r12,0
00000000003d76da: a7f4ffc2 brc 15,3d765e
Call Trace:
([<0000000000b6f000>] initcall_debug+0x0/0x4)
[<0000000000989e8a>] cfq_init+0x62/0xd4
[<00000000001000ba>] do_one_initcall+0x3a/0x170
[<000000000096fb60>] kernel_init+0x214/0x2bc
[<0000000000623202>] kernel_thread_starter+0x6/0xc
[<00000000006231fc>] kernel_thread_starter+0x0/0xc
no locks held by swapper/0/1.
Last Breaking-Event-Address:
[<00000000003d76c6>] blkcg_policy_register+0xc6/0xe0
---[ end trace b8ef4903fcbf9dd3 ]---
This patch fixes the problem by ensuring all blkcg support code is
inside CONFIG_CFQ_GROUP_IOSCHED.
* blkcg_policy_cfq declaration and blkg_to_cfqg() definition are moved
inside the first CONFIG_CFQ_GROUP_IOSCHED block. __maybe_unused is
dropped from blkcg_policy_cfq decl.
* blkcg_deactivate_poilcy() invocation is moved inside ifdef. This
also makes the activation logic match cfq_init_queue().
* All blkcg_policy_[un]register() invocations are moved inside ifdef.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20120601112954.GC3535@osiris.boeblingen.de.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-06-04 10:02:29 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-14 00:33:42 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|