All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Akira Hayakawa <ruby.wktk@gmail.com>
Cc: devel@driverdev.osuosl.org, thornber@redhat.com,
	cesarb@cesarb.net, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, hch@infradead.org,
	dm-devel@redhat.com, mpatocka@redhat.com, agk@redhat.com,
	joe@perches.com, akpm@linux-foundation.org, ejt@redhat.com,
	dan.carpenter@oracle.com, m.chehab@samsung.com
Subject: Re: Reworking dm-writeboost [was: Re: staging: Add dm-writeboost]
Date: Tue, 8 Oct 2013 11:29:25 -0400	[thread overview]
Message-ID: <20131008152924.GA3644@redhat.com> (raw)
In-Reply-To: <5253E06C.6040101@gmail.com>

On Tue, Oct 08 2013 at  6:37am -0400,
Akira Hayakawa <ruby.wktk@gmail.com> wrote:

> Christoph,
> 
> > You can detect O_DIRECT writes by second guession a special combination
> > of REQ_ flags only used there, as cfg tries to treat it special:
> > 
> > #define WRITE_SYNC              (WRITE | REQ_SYNC | REQ_NOIDLE)
> > #define WRITE_ODIRECT           (WRITE | REQ_SYNC)
> > 
> > the lack of REQ_NOIDLE when REQ_SYNC is set gives it away.  Not related
> > to the FLUSH or FUA flags in any way, though.
> Thanks.
> But, our problem is to detect the bio may or may not be deferred.
> The flag REQ_NOIDLE is the one?
> 
> > Akira, can you explain the workloads where your delay of FLUSH or FUA
> > requests helps you in any way?  I very much agree with Dave's reasoning,
> > but if you found workloads where your hack helps we should make sure we
> > fix them at the place where they are issued.
> One of the examples is a fileserver accessed by multiple users.
> A barrier is submitted when a user closes a file for example.
> 
> As I said in my previous post
> https://lkml.org/lkml/2013/10/4/186
> writeboost has RAM buffer and we want one to be
> fulfilled with writes and then flushed to the cache device
> that takes all the barriers away with the completion.
> In that case we pay the minimum penalty for the barriers.
> Interestingly, writeboost is happy with a lot of writes.
> 
> By deferring these barriers (FLUSH and FUA)
> multiple barriers are likely to be merged on a RAM buffer
> and then processed by replacing with only one FLUSH.
> 
> Merging the barriers and replacing it with a single FLUSH
> by accepting a lot of writes
> is the reason for deferring barriers in writeboost.
> If you want to know further I recommend you to
> look at the source code to see
> how queue_barrier_io() is used and
> how the barriers are kidnapped in queue_flushing().

AFAICT, this is an unfortunate hack resulting from dm-writeboost being a
bio-based DM target.  The block layer already has support for FLUSH
merging, see commit ae1b1539622fb4 ("block: reimplement FLUSH/FUA to
support merge")

  reply	other threads:[~2013-10-08 15:29 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-01 11:10 [PATCH] staging: Add dm-writeboost Akira Hayakawa
2013-09-16 21:53 ` Mike Snitzer
2013-09-16 21:53   ` Mike Snitzer
2013-09-16 22:49   ` Dan Carpenter
2013-09-16 22:49     ` Dan Carpenter
2013-09-17 12:41   ` Akira Hayakawa
2013-09-17 12:41     ` Akira Hayakawa
2013-09-17 20:18     ` Mike Snitzer
2013-09-17 20:18       ` Mike Snitzer
2013-09-17 12:43   ` Akira Hayakawa
2013-09-17 12:43     ` Akira Hayakawa
2013-09-17 20:59     ` Mike Snitzer
2013-09-17 20:59       ` Mike Snitzer
2013-09-22  0:09       ` Reworking dm-writeboost [was: Re: staging: Add dm-writeboost] Akira Hayakawa
2013-09-22  0:09         ` Akira Hayakawa
2013-09-24 12:20         ` Akira Hayakawa
2013-09-24 12:20           ` Akira Hayakawa
2013-09-25 17:37           ` Mike Snitzer
2013-09-25 17:37             ` Mike Snitzer
2013-09-26  1:42             ` Akira Hayakawa
2013-09-26  1:47             ` Akira Hayakawa
2013-09-27 18:35               ` Mike Snitzer
2013-09-27 18:35                 ` Mike Snitzer
2013-09-28 11:29                 ` Akira Hayakawa
2013-09-28 11:29                   ` Akira Hayakawa
2013-09-25 23:03           ` Greg KH
2013-09-25 23:03             ` Greg KH
2013-09-26  3:43           ` Dave Chinner
2013-10-01  8:26             ` Joe Thornber
2013-10-01  8:26               ` Joe Thornber
2013-10-03  0:01               ` Mikulas Patocka
2013-10-03  0:01                 ` [dm-devel] " Mikulas Patocka
2013-10-04  2:04                 ` Dave Chinner
2013-10-04  2:04                   ` Dave Chinner
2013-10-05  7:51                   ` Akira Hayakawa
2013-10-07 23:43                     ` Dave Chinner
2013-10-08  9:41                       ` Christoph Hellwig
2013-10-08  9:41                         ` Christoph Hellwig
2013-10-08 10:37                         ` Akira Hayakawa
2013-10-08 10:37                           ` Akira Hayakawa
2013-10-08 15:29                           ` Mike Snitzer [this message]
2013-10-09  1:07                             ` Akira Hayakawa
2013-10-09  1:07                               ` Akira Hayakawa
2013-10-08 10:57                       ` [dm-devel] " Akira Hayakawa
2013-10-08 10:57                         ` Akira Hayakawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131008152924.GA3644@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cesarb@cesarb.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dm-devel@redhat.com \
    --cc=ejt@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mpatocka@redhat.com \
    --cc=ruby.wktk@gmail.com \
    --cc=thornber@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.