Re: [PATCH 02/12] scsi: Add IRQ_DISABLE_SCSI_QCMD wrapper

Christoph Hellwig
2010-12-20T10:49:41Z

On Sun, Dec 19, 2010 at 01:21:57PM -0800, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch adds a IRQ_DISABLE_SCSI_QCMD() wrapper macro used by LLDs
> that can now run in host_lock less mode, but still need interrupts disabled
> using local_irq_save() before calling their lld_queuecommand() dispatcher.
>
> jgarzik says this method is in fact slower than doing a spin_lock_irqsave() on
> internal lib_lld_queuecommand() callers (as is done in libiscsi and libata)
> but is still needed by the majority of lock_less LLDs.

As mentioned before, please don't add more macro obsfucation - The
initial one Jeff added was ok for the quick transition and avoiding to
have two methods, but any additional one is not helpful.

In addition there's really no reason to every use this one. There is
not reason to disable local irqs in a driver without taking a spinlock.