On May 30, 2009, at 8:26, Trond Myklebust <trond.myklebust@xxxxxxxxxx>
wrote:
Firstly, the server only uses O_SYNC if you turn off write gathering
(a.k.a. the 'wdelay' option). The default behaviour for the Linux nfs
server is to always try write gathering and hence no O_SYNC.
Secondly, even if it were the case, then this does not justify
changing
the client behaviour. The NFS protocol does not mandate, or even
recommend that the server use O_SYNC. All it says is that a stable
write
and an unstable write+commit should both have the same result: namely
that the data+metadata must have been flushed to stable storage. The
protocol spec leaves it as an exercise to the server implementer to do
this as efficiently as possible.
Speaking of write gathering... Are we sure that heuristic that checks
i_writecount isn't introducing spurious 10ms delays here? It seems odd
for the server to do write gathering on nfsv3 writes: if the client
wants to send more writes, it will set the unstable flag...
Trond
--
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