xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Stodden <daniel.stodden@citrix.com>
To: "rshriram@cs.ubc.ca" <rshriram@cs.ubc.ca>
Cc: Xen Developers <xen-devel@lists.xensource.com>
Subject: Re: xen-blkfront: simplify resume?
Date: Thu, 24 Mar 2011 14:46:54 -0700	[thread overview]
Message-ID: <1301003214.11448.230.camel@agari.van.xensource.com> (raw)
In-Reply-To: <AANLkTik6PRJ3qrBBfg=2=J4gnmoRSiaPjZRxbAXW6BL2@mail.gmail.com>

On Thu, 2011-03-24 at 16:08 -0400, Shriram Rajagopalan wrote:

>         I wonder, should we just take the pending request and push it
>         back onto
>         the request_queue (with a blk_requeue_request)?
>         
>         Different from the present code, this should also help
>         preserve original
>         submit order if done right. (Don't panic, not like it matters
>         a lot
>         anymore since the block barrier flags are gone.)
>         
>         If we want to keep the shadow copy, let's do so with a
>         prep_rq_fn. It
>         gets called before the request gets pulled off the queue.
>         Looks nicer,
>         and one can arrange things so it only gets called once.
>         
>         Counter opinions?
>         
> A bit confused. If things were as simple as stuffing the pending reqs
> back
> into the req_queue, why resort to shadowing the requests in the first
> place?

You're not confused at all. I wasn't sure yet if pushing back requests
and just redoing them might be flawed somehow. Then just checking out
what the options would be if the shadow is still wanted.

One tiny little detail I forgot to consider was that the grant entries
need to flip MFNs. So R/W requests still need fixup before requeuing. 
Also, we still have to tear them down after completion :>.

So, keeping the entire request struct for reference, instead of growing
a custom vector type, isn't so bad.

One pretty way to fix up segments is to blk_unprep_request (tearing them
down), and then push the it back. They'll be reprepped (ouh, I love that
word) before they return.

Or keep the old way around, i.e. just a row update). Unprep might drop
some extra lines, and performance is a no-brainer. I'll guess I'll just
try it out.

> (esp, with the blk barrier flags gone)

Well yeah, on newer kernels. But deliberately breaking it in subtle
little ways doesn't look so smart either.

And despite the fact that FSes seem to have been draining quite eagerly
for quite some time, I think I've seen post-FLUSH+FUA patches for jbd2
adding missing drains where it still used to rely on queue order. No
idea sure if those missed in stable kernels.

Daniel

  reply	other threads:[~2011-03-24 21:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24  9:31 xen-blkfront: simplify resume? Daniel Stodden
2011-03-24 20:08 ` Shriram Rajagopalan
2011-03-24 21:46   ` Daniel Stodden [this message]
2011-03-24 21:47 ` Keir Fraser
2011-03-25  2:39   ` Daniel Stodden

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=1301003214.11448.230.camel@agari.van.xensource.com \
    --to=daniel.stodden@citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).