All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: Allow read IO during share block breaking in dm-thin
Date: Fri, 23 Aug 2013 10:59:29 +0100	[thread overview]
Message-ID: <20130823095929.GA24230@debian> (raw)
In-Reply-To: <CAKTMprMVgxTDjs+4JEJLgb+1BpLCnY_mXHzvROqKCEiGe5Ekpw@mail.gmail.com>

Hi Dennis,

On Fri, Aug 23, 2013 at 10:35:30AM +0800, Teng-Feng Yang wrote:
> So here is my question, do we really need to quiesce all share read
> IOs before adding a new data mapping, or the share read IO's deferred
> set is meant to deal with some other problems?

This is a good question.

As you say we could let the read ios continue to run to the old block.
For large block sizes this could reduce latency of those reads.

I have a suspicion that I originally wrote things this way so we never
complete a read bio with older data after earlier completing a write
bio.  But if the bios were submitted concurrently there's no need to
observe this restriction.

There is one thing you need to consider if you're going to make this
change.  The old block may well have it's reference count reduced to
zero as a result of inserting the new mapping.  This in itself is
fine; we're careful to never free and realloc a block within the same
transaction.  But it does mean you'd need to start quiescing as part
of the commit operation.  I worry that introducing quiescing at the
commit level would impact the latency of ios to all blocks, rather
than just the one that's having it's sharing broken.

You could restructure the REQ_FUA/REQ_FLUSH code (which triggers the
commits), such that only they get stalled waiting for the quiesce,
but that's a chunk more work.

Do some benchmarking, quantify the problem.  Then we can make a call
on whether the development effort is worth it.

- Joe

  reply	other threads:[~2013-08-23  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  2:35 Allow read IO during share block breaking in dm-thin Teng-Feng Yang
2013-08-23  9:59 ` Joe Thornber [this message]
2013-08-23 20:45 ` Mikulas Patocka

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=20130823095929.GA24230@debian \
    --to=thornber@redhat.com \
    --cc=dm-devel@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.