scsi: ufs: Add write booster feature support
authorAsutosh Das <asutoshd@codeaurora.org>
Wed, 22 Apr 2020 21:41:42 +0000 (14:41 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 27 Apr 2020 22:39:56 +0000 (18:39 -0400)
commit3d17b9b5ab11556b2fea07d4f24154095a685ad2
tree3690ba4c396151120095734b25ce89d52f2f2f14
parent7dfdcc393dcdd63f4ea15d06c97a719451cfbb77
scsi: ufs: Add write booster feature support

The write performance of TLC NAND is considerably lower than SLC NAND.
Using SLC NAND as a WriteBooster Buffer enables the write request to be
processed with lower latency and improves the overall write performance.

Adds support for shared-buffer mode WriteBooster.

WriteBooster enable: SW enables it when clocks are scaled up, thus it's
enabled only in high load conditions.

WriteBooster disable: SW will disable the feature, when clocks are scaled
down. Thus writes would go as normal writes.

To keep the endurance of the WriteBooster Buffer at a maximum, this
load-based toggling is adopted.

Link: https://lore.kernel.org/r/2871444d9083b0e9323ef6d8ff1b544b7784adc9.1587591527.git.asutoshd@codeaurora.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h