Rao Shoaib writes: > Darren Reed wrote: > > On the topic of zero-copy, what do we currently do with NFS and what > > can we do? > > > > For example, will the NFS code be able to read data from disk into a > > buffer that can be attached to an mblk and sent out, without requiring > > any copying? > > This is possible even today using desballoca. sendfile uses this.
But does NFS also use it, or does NFS do a copy? What are the NFS semantics for a file changing as it is read? Let's say client A requests a read of 8192 bytes from offset 0 in a file, and an "instant" later, client B writes 8192 bytes at offset 0 of the same file. Do the read and write simply race with each other? I assume there must be a reader/writer lock around that file on the NFS server, or those blocks at least, and the write has to wait for the read to complete before it can upgrage the lock to exclusive access. Is this true? If there is a reader/writer lock, what are the implications of waiting a "long time" for the network send to complete if zero-copy is done by NFS, rather than nearly instantly if the data is bcopied? Drew _______________________________________________ networking-discuss mailing list [email protected]
