]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: ufshpb: Add "cold" regions timer
authorAvri Altman <avri.altman@wdc.com>
Mon, 12 Jul 2021 09:50:35 +0000 (12:50 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 1 Aug 2021 20:05:15 +0000 (16:05 -0400)
commit4fd83777cd7a385d9ca9aec0f5e366845127fb6a
tree121bd601800c79e94424cd540c6113a52ca41b11
parent6ba7cda09b4c030a1d6b1638b2e3a642feada100
scsi: ufs: ufshpb: Add "cold" regions timer

In order not to hang on to "cold" regions, we inactivate a region that has
had no READ access for a predefined amount of time - READ_TO_MS. For that
purpose monitor the active regions list, polling it on every
POLLING_INTERVAL_MS. On timeout expiry add the region to the
"to-be-inactivated" list unless it is clean and did not exhaust its
READ_TO_EXPIRIES - another parameter.

None of this applies to pinned regions.

Link: https://lore.kernel.org/r/20210712095039.8093-9-avri.altman@wdc.com
Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshpb.c
drivers/scsi/ufs/ufshpb.h