public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET block#for-2.6.29] block: simplify and fix empty barrier
@ 2008-11-28  4:32 Tejun Heo
  2008-11-28  4:32 ` [PATCH 1/6] block: reorganize QUEUE_ORDERED_* constants Tejun Heo
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Tejun Heo @ 2008-11-28  4:32 UTC (permalink / raw)
  To: jens.axboe, linux-kernel


Hello, Jens.

As it currently stands, empty barrier is being handled a little bit
differently from other types of barriers.  It wraps around the normal
barrier implementation but intercepts BAR issue and completes it in
elv_next_request() without letting the low level driver see it.  This
works but is a little bit hacky.

The barrier or ordered sequence implementation is already quite
flexible to accomodate different modes, it just needs small
adjustments to support empty barrier in similar way different barrier
modes are handled.

This patchset updates start_ordered() and ordered sequence completion
more flexible such that BAR itself can be made optional and
reimplements empty barrier by simply turning off DO_BAR and
DO_POSTFLUSH flags in start_ordered().

This patchset also fixes empty barrier on write-through (or no cache)
w/ ordered tag.  Previously, this basically desolved into noop and
without any command to issue, ordering by tag wasn't enforced at all.
This patchset promotes such empty barriers to DRAIN.

This patchset contains the following six patches.

 0001-block-reorganize-QUEUE_ORDERED_-constants.patch
 0002-block-remove-duplicate-or-unused-barrier-discard-er.patch
 0003-block-make-every-barrier-action-optional.patch
 0004-block-make-barrier-completion-more-robust.patch
 0005-block-simplify-empty-barrier-implementation.patch
 0006-block-fix-empty-barrier-on-write-through-w-ordered.patch

0001-0002 preps for the following changes.  0003-0004 makes ordered
sequence implementation more flexible.  0005 simplifies empty barrier
implementation and 0006 fixes the noop bug.

This patchset is on top of

  linux-2.6-block#for-2.6.29 (75f2e95a9641224c7077d5e677f2a5fe2fdd4f0e)
+ block-internal-dequeue-shouldnt-start-timer [1]

and contains the following changes.

 block/blk-barrier.c    |  120 +++++++++++++++++++++++++++++++------------------
 block/blk-core.c       |   44 ++++-------------
 block/elevator.c       |   18 ++-----
 include/linux/blkdev.h |   47 +++++++++++--------
 4 files changed, 122 insertions(+), 107 deletions(-)

Thanks.

--
tejun

[1] http://article.gmane.org/gmane.linux.kernel/763054

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-12-12 13:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28  4:32 [PATCHSET block#for-2.6.29] block: simplify and fix empty barrier Tejun Heo
2008-11-28  4:32 ` [PATCH 1/6] block: reorganize QUEUE_ORDERED_* constants Tejun Heo
2008-11-28  4:32 ` [PATCH 2/6] block: remove duplicate or unused barrier/discard error paths Tejun Heo
2008-11-28  4:32 ` [PATCH 3/6] block: make every barrier action optional Tejun Heo
2008-11-28  4:32 ` [PATCH 4/6] block: make barrier completion more robust Tejun Heo
2008-11-28  4:32 ` [PATCH 5/6] block: simplify empty barrier implementation Tejun Heo
2008-11-28  4:32 ` [PATCH 6/6] block: fix empty barrier on write-through w/ ordered tag Tejun Heo
2008-12-12  3:23 ` [PATCHSET block#for-2.6.29] block: simplify and fix empty barrier Tejun Heo
2008-12-12  6:34   ` Jens Axboe
2008-12-12  7:19     ` Tejun Heo
2008-12-12 11:36       ` Jens Axboe
2008-12-12 13:26         ` Tejun Heo
2008-12-12 13:28           ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox