Re: Fatal crash with NFS, AIO & tcp retransmit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-01-21 at 17:12 +0000, Alex Bligh wrote:
> Trond,
> 
> --On 21 January 2013 15:50:48 +0000 "Myklebust, Trond" 
> <Trond.Myklebust@xxxxxxxxxx> wrote:
> 
> >> I don't think QEMU is actually using O_DIRECT unless I set cache=none
> >> on the drive. That causes a different interesting failure which isn't
> >> my focus just now!
> >
> > Then your reference to Ian's bug is a red herring.
> >
> > If the application is using buffered writes, then the data is
> > immediately copied from userspace to the page cache. Once the copy to
> > the page cache is done, userspace can do whatever it wants with the
> > original buffer, because only the page cache pages are used in the RPC
> > calls.
> >
> > aio doesn't change any of this...
> 
> So, just to be clear, if a process is using NFS and AIO with O_DSYNC
> (but not O_DIRECT) - which is I think what QEMU is meant to be doing -
> then it should *never* be zero copy (even if writes happen to be
> appropriately aligned). Is that correct? If so, I can strace the
> process and see exactly what flags it is using.
> 

That is correct. If you want zero-copy, then O_DIRECT is your thing
(with or without aio). Otherwise, the kernel will always write to disk
by copying through the page cache.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux