Re: [PATCH 2/2] scsi: ufs: Use SYNCHRONIZE CACHE instead of FUA

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

 



On Thu, 2023-02-02 at 10:09 -0800, Bart Van Assche wrote:
> On 2/1/23 23:52, Adrian Hunter wrote:
> > On 1/02/23 20:06, Bart Van Assche wrote:
> > > UFS devices perform better when using SYNCHRONIZE CACHE command
> > > instead of the FUA flag. Hence this patch.
> > 
> > It would be nice to get some clarification on what is
> > going on for this case.
> > 
> > This includes with Data Reliability enabled?
> > 
> > In theory, WRITE+FUA should be at least as fast as
> > WRITE+SYNCHRONIZE CACHE, right?
> > 
> > Do we have any explanation for why that would not
> > be true?
> > 
> > In particular, is SYNCHRONIZE CACHE faster because
> > it is not, in fact, providing Reliable Writes?
>   Hi Adrian,
> 
> Setting the FUA bit in a WRITE command is functionally equivalent to 
> submitting a WRITE command without FUA and submitting a SYNCHRONIZE 
> CACHE command afterwards. For both sequences the storage device has
> to guarantee that the written data will survive a sudden power loss
> event.

Well, that may not be true in all situations.  Semantically FUA is a
barrier: it can be implemented such that it destages only the current
write plus the cache writes that occurred before the write with the
FUA.  It could also be implemented as you suggest above, which simply
destages the entire cache, but it doesn't have to be.  One of the
reasons for FUA to exist is the potential difference between the two.

James




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux