Thread (50 messages) 50 messages, 11 authors, 2021-11-19

Re: [PATCH 10/11] scsi: ufs: Optimize the command queueing code

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-11-10 18:59:00

On 11/10/21 12:04 AM, Adrian Hunter wrote:
On 10/11/2021 02:44, Bart Van Assche wrote:
quoted
@@ -2698,8 +2653,11 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
  
  	WARN_ONCE(tag < 0, "Invalid tag %d\n", tag);
  
-	if (!down_read_trylock(&hba->clk_scaling_lock))
-		return SCSI_MLQUEUE_HOST_BUSY;
+	/*
+	 * Allows ufshcd_clock_scaling_prepare() and also the UFS error handler
+	 * to wait for prior ufshcd_queuecommand() calls.
+	 */
+	rcu_read_lock();
The improvement to flush/drain ufshcd_queuecommand() via RCU should
be a separate patch because it is not dependent on the other changes.
I will split this patch into two patches.

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help