Linux NFS development
 help / color / mirror / Atom feed
From: Alex Bligh <alex@alex.org.uk>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
	Peter Staubach <pstaubach@exagrid.com>
Cc: linux-nfs@vger.kernel.org, ian.campbell@citrix.com,
	Alex Bligh <alex@alex.org.uk>
Subject: Re: Fatal crash with NFS, AIO & tcp retransmit
Date: Wed, 23 Jan 2013 19:37:55 +0000	[thread overview]
Message-ID: <7CD6CC530A524B9745F846FB@nimrod.local> (raw)
In-Reply-To: <4FA345DA4F4AE44899BD2B03EEEC2FA918332049@sacexcmbx05-prd.hq.netapp.com>



--On 23 January 2013 18:13:34 +0000 "Myklebust, Trond" 
<Trond.Myklebust@netapp.com> wrote:

>> They can't disappear until they have been successfully transmitted and a
>> response received.  The problem here is that there were two requests
>> sent or being sent and the page(s) can't be released until everyone,
>> including TCP and such, are done with them.
>>
>> 		ps
>
> Right. The O_DIRECT write() system call will not return until it gets a
> reply. Similarly, we don't mark an aio/dio request as complete until it
> too gets a reply. So the data for those requests that need
> retransmission is still available to be resent through the socket.

I apologise for my stupidity here as I think I must be missing something.

I thought we'd established that Xen's grant system doesn't release the page
until QEMU says the block I/O is complete. QEMU only states that the block
I/O is complete when AIO says it is. What's happening (as far as I can tell
from the oops) is that the grant system is releasing the page AFTER the aio
request is complete (and dio may the same), but at that stage the page is
still referenced by the tcp stack. That contradicts what you say about not
marking the aio/dio request as complete until it gets a reply, unless it's
the case that you can get a reply to a request when there is still data
that the TCP stack can ask to retransmit (I suppose that's conceivable
if the reply gets sent before the ACK of the data received).

My understanding (which may well be completely wrong) is that the problem
was that xen was unmapping the page even though it still had kernel
references to it. This is why the problem does not happen in kvm (which
does not as I understand it do a similar map/unmap operation). From Ian C I
understand that just looking at the number of kernel references is not
sufficient.

-- 
Alex Bligh

  reply	other threads:[~2013-01-23 19:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 13:06 Fatal crash with NFS, AIO & tcp retransmit Alex Bligh
2013-01-21 14:38 ` Myklebust, Trond
2013-01-21 15:01   ` Alex Bligh
2013-01-21 15:10     ` Alex Bligh
2013-01-21 15:21       ` Ian Campbell
2013-01-25 13:45         ` Alex Bligh
2013-01-21 15:50     ` Myklebust, Trond
2013-01-21 15:54       ` Ian Campbell
2013-01-21 17:12       ` Alex Bligh
2013-01-21 17:20         ` Myklebust, Trond
2013-01-21 17:29           ` Alex Bligh
2013-01-23 15:22           ` Alex Bligh
2013-01-23 15:34             ` Myklebust, Trond
2013-01-23 17:33               ` Alex Bligh
2013-01-23 17:37                 ` Myklebust, Trond
2013-01-23 17:42                   ` Alex Bligh
2013-01-23 17:48                     ` Peter Staubach
2013-01-23 18:13                       ` Myklebust, Trond
2013-01-23 19:37                         ` Alex Bligh [this message]
2013-01-24 10:42                           ` Ian Campbell
2013-01-24 12:00                             ` Alex Bligh

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=7CD6CC530A524B9745F846FB@nimrod.local \
    --to=alex@alex.org.uk \
    --cc=Trond.Myklebust@netapp.com \
    --cc=ian.campbell@citrix.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pstaubach@exagrid.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