Re: stable page writes: wait_on_page_writeback and packet signing

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

 



On Wed, 9 Mar 2011 20:30:44 -0500
Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> > 
> > But ... we can stop writeback as soon as kernel_sendmsg returns - once
> > we return from kernel_sendmsg the buffers can (and often will) be
> > freed so we know those pages could not still be used by tcp  (below
> > cifs) once kernel_sendmsg returns.  We can minimize the delay further
> > by making sure we set TCP_NODELAY on the socket (we probably ought to
> > make that the default instead of an option).
> > 
> 
> That's not correct. A return from kernel_sendmsg just means that the
> data has been buffered up, not that it has been sent and acked. We
> shouldn't use that as an indicator to mean that the pages no longer
> need to be stable.
> 

Correction...

Steve is correct that we have no need to keep the page stable after
kernel_sendmsg returns. That codepath copies the data to from the iovec
to the send buffer. I got kernel_sendmsg mixed up with kernel_sendpages.
NFS uses both, depending on how the xdr buffer is layed out.

Eventually we should probably consider moving cifs to use ->sendpage
for writes instead, which would allow us to do sends directly out of
the pagecache. To do that though, we would need to keep the pages
stable until the write is complete, or at least until it has been
ACK'ed (if we can work out a way to do that).

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux