On Tue, Sep 14, 2021 at 4:25 PM Dmitry Bogdanov <d.bogdanov@xxxxxxxxx> wrote: > > Under session level spinlock node->active_ios_lock in > efct_scsi_io_alloc() there is a getting other spinlock of port level. > That lead to competition between sessions and even between IOs in the > same session due too much instructions under spinlock. > > This change reduces spinlock area just to active_ios list for which > active_ios_lock is intended. > Spinlock CPU usage is decreased from 18% down to 13% in efct driver. > IOPS are increased from 220 kIOPS upto 264 kIOPS for one lun on my setup. > > Reviewed-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx> > Signed-off-by: Dmitry Bogdanov <d.bogdanov@xxxxxxxxx> > --- > drivers/scsi/elx/efct/efct_scsi.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/elx/efct/efct_scsi.c b/drivers/scsi/elx/efct/efct_scsi.c > index 40fb3a724c76..8535bb7eabd8 100644 > --- a/drivers/scsi/elx/efct/efct_scsi.c > +++ b/drivers/scsi/elx/efct/efct_scsi.c > @@ -38,8 +38,6 @@ efct_scsi_io_alloc(struct efct_node *node) > > xport = efct->xport; > > - spin_lock_irqsave(&node->active_ios_lock, flags); > - > io = efct_io_pool_io_alloc(efct->xport->io_pool); > if (!io) { > efc_log_err(efct, "IO alloc Failed\n"); > @@ -66,6 +64,7 @@ efct_scsi_io_alloc(struct efct_node *node) > > /* Add to node's active_ios list */ > INIT_LIST_HEAD(&io->list_entry); > + spin_lock_irqsave(&node->active_ios_lock, flags); > list_add(&io->list_entry, &node->active_ios); > > spin_unlock_irqrestore(&node->active_ios_lock, flags); > -- > 2.25.1 > Looks good. Thanks. Reviewed-by: Ram Vegesna <ram.vegesna@xxxxxxxxxxxx> -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature