1 Sep 2010 01:56
Re: [Open-FCoE] [RFC PATCH] scsi, fcoe, libfc: drop scsi host_lock use from fc_queuecommand
Nicholas A. Bellinger <nab <at> linux-iscsi.org>
2010-08-31 23:56:25 GMT
2010-08-31 23:56:25 GMT
On Tue, 2010-08-31 at 15:53 -0700, Vasu Dev wrote: > Currently fc_queuecommand drops this lock very early on and then re-acquires > this lock just before return, this re-acquired lock gets dropped immediately > by its fast path caller scsi_dispatch_cmd, this re-acquire and then immediate > drop on each IO hits performance especially with small size IOs on multi-core > systems, this hit is significant about 25% with 512 bytes size IOs. > > This lock is not needed in fc_queuecommand and calling fc_queuecommand > without this lock held removes performance hit due to above described > re-acquire and immediately dropping this lock on each IO. Hi Vasu, Very interesting numbers with small blocksizes and your patch. I recall trying to make a similar optimization patch myself in early 2.6.0 for Linux/iSCSI initiators which still obtained struct Scsi_Host->host_lock before calling struct scsi_host_template->queuecommand() in drivers/scsi/scsi.c:scsi_dispatch_cmd(), but instead simply did not attempt disable hard interrupts with spin_lock_irqsave(). I actually run into some deadlocks way back then, and ended up giving up on the patch and have not pursued the idea further since.. Anyways the idea is an interesting one for discussion, and it's interesting to finally see the numbers on this. I have comment on your patch below.. > > So this patch adds unlocked_qcmds flag to drop host_lock before > calling only fc_queuecommand and no need to re-acquire and then drop(Continue reading)
RSS Feed