On 10/18/23 17:24, Damien Le Moal wrote:
On 10/19/23 02:54, Bart Van Assche wrote:
+void scsi_call_prepare_resubmit(struct list_head *done_q)
+{
+ struct scsi_cmnd *scmd, *next;
+
+ if (!scsi_needs_preparation(done_q))
+ return;
This function will always go through the list of commands in done_q. That could
hurt performance for scsi hosts that do not need this prepare resubmit, which I
think is UFS only for now. So can't we just add a flag or something to avoid that ?
Hi Damien,
The SCSI error handler is only invoked after an RCU grace period has
expired. The time spent in scsi_needs_preparation() is negligible
compared to an RCU grace period, especially if the
.eh_needs_prepare_resubmit pointers are NULL.
Thanks,
Bart.