From: Matthew Wilcox <matthew@wil.cx>
To: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] qla2xxx: spin_unlock_irq in IRQ context
Date: Tue, 9 Jan 2007 05:29:23 -0700 [thread overview]
Message-ID: <20070109122923.GA9819@parisc-linux.org> (raw)
In-Reply-To: <6.0.0.20.2.20070109162928.02ea3500@172.19.0.2>
On Tue, Jan 09, 2007 at 04:46:34PM +0900, Hisashi Hifumi wrote:
> Hi
>
> >If the function can be called with interrupts disabled as well as
> >enabled, then the spin_lock_irq needs to become a spin_lock_irqsave()
> >which is the correct API for this case.
>
> I know that spin_lock_irqsave()/spin_unlock_irqrestore() is correct .
> But in this case, many places need to be modified to use
> spin_lock_irqsave()/spin_unlock_irqrestore().Because
> spin_lock_irqsave()/spin_unlock_irqrestore() is not in the same function,
> and it is needed to pass eflags.
>
> So I use in_irq() to distinguish between IRQ and process context and
> minimize modifications.
Why do we need to re-enable interrupts here? Can't we just
spin_unlock() / spin_lock()? Actually, I don't see why we need to drop
the lock here ... starget_for_each_device can be called under a
spinlock. qla2x00_adjust_sdev_qdepth_up() only calls
scsi_adjust_queue_depth(). Is there an AB-BA issue with hardware_lock
and request_queue->queue_lock?
prev parent reply other threads:[~2007-01-09 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-09 5:35 [PATCH] qla2xxx: spin_unlock_irq in IRQ context Hisashi Hifumi
2007-01-09 7:27 ` James Bottomley
2007-01-09 7:46 ` Hisashi Hifumi
2007-01-09 12:29 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070109122923.GA9819@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=andrew.vasquez@qlogic.com \
--cc=hifumi.hisashi@oss.ntt.co.jp \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.