public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Untie the host lock entanglement - part 1
@ 2024-10-22  7:43 Avri Altman
  2024-10-22  7:43 ` [PATCH v2 1/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR Avri Altman
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Avri Altman @ 2024-10-22  7:43 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bart Van Assche, Avri Altman

While trying to simplify the ufs core driver with the guard() macro [1],
Bart made note of the abuse of the scsi host lock in the ufs driver.
Indeed, the host lock is deeply entangled in various flows across the
driver, as if it was some occasional default synchronization mean.

Here is the first part of defusing it, remove some of those calls around
host registers accesses, which needs no protection.

Doing this in phases seems like a reasonable approach, given the myriad
use of the host lock.


Changes compared to v1:
 - get rid of redundant locking (Bart)
 - leave out the HCE register

[1] https://lore.kernel.org/linux-scsi/0b031b8f-c07c-42ef-af93-7336439d3c37@acm.org/

Avri Altman (3):
  scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR.
  scsi: ufs: core: Remove redundant host_lock calls around UTMRLCLR
  scsi: ufs: core: Remove redundant host_lock calls around UTRLCLR.

 drivers/ufs/core/ufshcd.c | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-23 19:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22  7:43 [PATCH v2 0/3] Untie the host lock entanglement - part 1 Avri Altman
2024-10-22  7:43 ` [PATCH v2 1/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR Avri Altman
2024-10-22 16:51   ` Bart Van Assche
2024-10-23  6:47     ` Avri Altman
2024-10-23 19:44       ` Bart Van Assche
2024-10-22  7:43 ` [PATCH v2 2/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLCLR Avri Altman
2024-10-22 16:52   ` Bart Van Assche
2024-10-22  7:43 ` [PATCH v2 3/3] scsi: ufs: core: Remove redundant host_lock calls around UTRLCLR Avri Altman
2024-10-22 16:52   ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox