Re: [PATCH v3 2/2] NFS: Enable the RWF_DONTCACHE flag for the NFS client

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

 



On Mon, Aug 18, 2025 at 09:49:47AM -0700, Trond Myklebust wrote:
> > Can you remind me why we clear the writeback flag as soon as the
> > WRITE
> > completes instead of leaving it set until the COMMIT completes?
> 
> It's about reducing latency.
> 
> An unstable WRITE is typically a quick operation because it only
> requires the server to cache the data.
> 
> COMMIT requires persistence, and so it is typically slower.
> Furthermore, the intention of COMMIT is to also allow the batching of
> writeback on the server, so that disk wakeup and seeks are minimised.
> While that is probably much less of a concern with modern SSDs vs older
> hard drives, the NFS client design has to cater to both.
> 
> So by clearing the writeback flag after the WRITE, we allow operations
> that want to further modify a specific folio to proceed without having
> to wait for persistence of the entire batch.

Ah; NFS sets SB_I_STABLE_WRITES.  Unfortunately, 6c17260ca4ae is
a little light on details about why.





[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