mbox series

[v2,0/2] Use SYNCHRONIZE CACHE instead of FUA for UFS devices

Message ID 20230202220041.560919-1-bvanassche@acm.org
Headers show
Series Use SYNCHRONIZE CACHE instead of FUA for UFS devices | expand

Message

Bart Van Assche Feb. 2, 2023, 10 p.m. UTC
Hi Martin,

Measurements have shown that UFS devices perform better when using SYNCHRONIZE
CACHE instead of FUA. Hence this patch series that makes the SCSI core submit
a SYNCHRONIZE CACHE command instead of setting the FUA bit for UFS
devices. Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v1:
- Updated __BLIST_LAST_USED.
- Added #include <scsi/scsi_devinfo.h> to fix a build error reported by the
  kernel robot.

Asutosh Das (1):
  scsi: ufs: Use SYNCHRONIZE CACHE instead of FUA

Bart Van Assche (1):
  scsi: core: Introduce the BLIST_BROKEN_FUA flag

 drivers/scsi/scsi_scan.c    | 3 +++
 drivers/ufs/core/ufshcd.c   | 4 ++++
 include/scsi/scsi_devinfo.h | 4 +++-
 3 files changed, 10 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig Feb. 3, 2023, 6:30 a.m. UTC | #1
On Thu, Feb 02, 2023 at 02:00:39PM -0800, Bart Van Assche wrote:
> Hi Martin,
> 
> Measurements have shown that UFS devices perform better when using SYNCHRONIZE
> CACHE instead of FUA. Hence this patch series that makes the SCSI core submit
> a SYNCHRONIZE CACHE command instead of setting the FUA bit for UFS
> devices. Please consider this patch series for the next merge window.

NAK.  This is a policy decision that might make sense for current UFS
devices.  If you want to do it use the sysfs files from udev to quirk
it up for them.  But there is nothing inherent in the UFS transport
that speaks against using FUA.

And please lobby your suppliers to either don't claim FUA support or
implement it in a useful way in the future.  Unlikely most of us you
and your employer actually have that power in the market.
Bean Huo Feb. 3, 2023, 3:34 p.m. UTC | #2
Hi Bart,

To this series patch:


Reviewed-by: Bean Huo <beanhuo@micron.com>


Thanks,

Bean
Bart Van Assche Feb. 3, 2023, 5:54 p.m. UTC | #3
On 2/2/23 22:30, Christoph Hellwig wrote:
> On Thu, Feb 02, 2023 at 02:00:39PM -0800, Bart Van Assche wrote:
>> Hi Martin,
>>
>> Measurements have shown that UFS devices perform better when using SYNCHRONIZE
>> CACHE instead of FUA. Hence this patch series that makes the SCSI core submit
>> a SYNCHRONIZE CACHE command instead of setting the FUA bit for UFS
>> devices. Please consider this patch series for the next merge window.
> 
> NAK.  This is a policy decision that might make sense for current UFS
> devices.  If you want to do it use the sysfs files from udev to quirk
> it up for them.  But there is nothing inherent in the UFS transport
> that speaks against using FUA.
> 
> And please lobby your suppliers to either don't claim FUA support or
> implement it in a useful way in the future.  Unlikely most of us you
> and your employer actually have that power in the market.

Hi Christoph,

We can ask our suppliers politely to not claim FUA support in future 
devices. However we still need patch 1/2 for existing UFS devices.

Bart.
Christoph Hellwig Feb. 8, 2023, 6:32 a.m. UTC | #4
On Fri, Feb 03, 2023 at 09:54:24AM -0800, Bart Van Assche wrote:
> We can ask our suppliers politely to not claim FUA support in future
> devices. However we still need patch 1/2 for existing UFS devices.

Please add quirks for the actually affected devices, and do not
block fua for an entire transport.
Martin K. Petersen Feb. 8, 2023, 11:55 p.m. UTC | #5
Christoph,

>> We can ask our suppliers politely to not claim FUA support in future
>> devices. However we still need patch 1/2 for existing UFS devices.
>
> Please add quirks for the actually affected devices, and do not
> block fua for an entire transport.

Yeah, I agree. Let's not make assumptions about implementation
deficiencies based on transport. If there are specific devices that
perform better with SYNCHRONIZE CACHE, then we should quirk them.