1
0
Fork 0
alistair23-linux/block
Tejun Heo 28e7d18452 block: drop barrier ordering by queue draining
Filesystems will take all the responsibilities for ordering requests
around commit writes and will only indicate how the commit writes
themselves should be handled by block layers.  This patch drops
barrier ordering by queue draining from block layer.  Ordering by
draining implementation was somewhat invasive to request handling.
List of notable changes follow.

* Each queue has 1 bit color which is flipped on each barrier issue.
  This is used to track whether a given request is issued before the
  current barrier or not.  REQ_ORDERED_COLOR flag and coloring
  implementation in __elv_add_request() are removed.

* Requests which shouldn't be processed yet for draining were stalled
  by returning -EAGAIN from blk_do_ordered() according to the test
  result between blk_ordered_req_seq() and blk_blk_ordered_cur_seq().
  This logic is removed.

* Draining completion logic in elv_completed_request() removed.

* All barrier sequence requests were queued to request queue and then
  trckled to lower layer according to progress and thus maintaining
  request orders during requeue was necessary.  This is replaced by
  queueing the next request in the barrier sequence only after the
  current one is complete from blk_ordered_complete_seq(), which
  removes the need for multiple proxy requests in struct request_queue
  and the request sorting logic in the ELEVATOR_INSERT_REQUEUE path of
  elv_insert().

* As barriers no longer have ordering constraints, there's no need to
  dump the whole elevator onto the dispatch queue on each barrier.
  Insert barriers at the front instead.

* If other barrier requests come to the front of the dispatch queue
  while one is already in progress, they are stored in
  q->pending_barriers and restored to dispatch queue one-by-one after
  each barrier completion from blk_ordered_complete_seq().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-09-10 12:35:36 +02:00
..
Kconfig blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
Kconfig.iosched blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
Makefile blkdev: move blkdev_issue helper functions to separate file 2010-04-28 19:47:36 +02:00
blk-barrier.c block: drop barrier ordering by queue draining 2010-09-10 12:35:36 +02:00
blk-cgroup.c Merge branch 'master' into for-2.6.35 2010-05-21 21:27:26 +02:00
blk-cgroup.h blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
blk-core.c block: drop barrier ordering by queue draining 2010-09-10 12:35:36 +02:00
blk-exec.c block: remove wrappers for request type/flags 2010-08-07 18:17:56 +02:00
blk-integrity.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
blk-ioc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-lib.c block: add secure discard 2010-08-12 08:43:30 -07:00
blk-map.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
blk-merge.c gcc-4.6: block: fix unused but set variables in blk-merge 2010-08-07 18:23:10 +02:00
blk-settings.c block: deprecate barrier and replace blk_queue_ordered() with blk_queue_flush() 2010-09-10 12:35:36 +02:00
blk-softirq.c generic-ipi: remove CSD_FLAG_WAIT 2009-02-25 14:13:44 +01:00
blk-sysfs.c block: add helpers for the trivial queue flag sysfs show/store entries 2010-08-07 18:13:50 +02:00
blk-tag.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
blk-timeout.c block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer 2010-04-21 17:42:08 +02:00
blk.h block: drop barrier ordering by queue draining 2010-09-10 12:35:36 +02:00
bsg.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cfq-iosched.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
cfq.h cfq: fix recursive call in cfq_blkiocg_update_completion_stats() 2010-06-21 09:10:55 +02:00
compat_ioctl.c block: add secure discard 2010-08-12 08:43:30 -07:00
deadline-iosched.c block: convert to pos and nr_sectors accessors 2009-05-11 09:50:54 +02:00
elevator.c block: drop barrier ordering by queue draining 2010-09-10 12:35:36 +02:00
genhd.c block: remove all rcu head initializations 2010-05-21 20:01:02 +02:00
ioctl.c block: add secure discard 2010-08-12 08:43:30 -07:00
noop-iosched.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
scsi_ioctl.c block/scsi_ioctl.c: quiet sparse noise 2009-11-04 09:10:33 +01:00