On 1/02/23 20:06, Bart Van Assche wrote: > From: Asutosh Das <asutoshd@xxxxxxxxxxxxxx> > > UFS devices perform better when using SYNCHRONIZE CACHE command > instead of the FUA flag. Hence this patch. Hi 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? > > Signed-off-by: Asutosh Das <asutoshd@xxxxxxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > [ bvanassche: modified a source code comment ] > --- > drivers/ufs/core/ufshcd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index bf3cb12ef02f..461aa51cfccc 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -5056,6 +5056,9 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev) > /* WRITE_SAME command is not supported */ > sdev->no_write_same = 1; > > + /* Use SYNCHRONIZE CACHE instead of FUA to improve performance */ > + sdev->sdev_bflags = BLIST_BROKEN_FUA; > + > ufshcd_lu_init(hba, sdev); > > ufshcd_setup_links(hba, sdev);