From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
Asutosh Das <quic_asutoshd@quicinc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Bean Huo <beanhuo@micron.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Jinyoung Choi <j-young.choi@samsung.com>
Subject: [PATCH v2 2/2] scsi: ufs: Use SYNCHRONIZE CACHE instead of FUA
Date: Thu, 2 Feb 2023 14:00:41 -0800 [thread overview]
Message-ID: <20230202220041.560919-3-bvanassche@acm.org> (raw)
In-Reply-To: <20230202220041.560919-1-bvanassche@acm.org>
From: Asutosh Das <quic_asutoshd@quicinc.com>
UFS devices perform better when using SYNCHRONIZE CACHE command
instead of the FUA flag. Hence this patch.
Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ bvanassche: modified a source code comment ]
---
drivers/ufs/core/ufshcd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index bf3cb12ef02f..a8d42d9308da 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -24,6 +24,7 @@
#include <linux/sched/clock.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_devinfo.h>
#include <scsi/scsi_driver.h>
#include <scsi/scsi_eh.h>
#include "ufshcd-priv.h"
@@ -5056,6 +5057,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);
next prev parent reply other threads:[~2023-02-02 22:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 22:00 [PATCH v2 0/2] Use SYNCHRONIZE CACHE instead of FUA for UFS devices Bart Van Assche
2023-02-02 22:00 ` [PATCH v2 1/2] scsi: core: Introduce the BLIST_BROKEN_FUA flag Bart Van Assche
2023-05-05 20:36 ` Bart Van Assche
2023-02-02 22:00 ` Bart Van Assche [this message]
2023-02-03 6:30 ` [PATCH v2 0/2] Use SYNCHRONIZE CACHE instead of FUA for UFS devices Christoph Hellwig
2023-02-03 17:54 ` Bart Van Assche
2023-02-08 6:32 ` Christoph Hellwig
2023-02-08 23:55 ` Martin K. Petersen
2023-02-03 15:34 ` Bean Huo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230202220041.560919-3-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=j-young.choi@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).