All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Mark Lord <liml@rtr.ca>, Alan Cox <alan@redhat.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: Correct use of  ap->lock  versus  ap->host->lock ?
Date: Fri, 07 Mar 2008 08:04:01 +0900	[thread overview]
Message-ID: <47D07861.5030306@gmail.com> (raw)
In-Reply-To: <47D033F5.9090303@garzik.org>

Jeff Garzik wrote:
> Jeff Garzik wrote:
>> You need to perform your own LLD-specific locking analysis to see if
>> it is safe to do, e.g. __mv_stop_dma() rather than mv_stop_dma().
> 
> And speaking as the probable author of some of the code that takes a
> lock during EH in sata_mv....   reinforcing that the above quoted
> statement is true.
> 
> Generally I would put in a lock during EH around register or data
> manipulations that were locked elsewhere in the driver, thus
> guaranteeing such code is safe.
> 
> However, it may also be the case that such a lock during EH is
> unnecessary because command submission machinery is disabled.  I chose a
> path that potentially added more locking, but was much easier to verify
> correct.

I think it's generally safe not to grab any locks during resets as all
the submission machinery && the interrupt handler are shut down, so it
should be safe to go lockless.  There may be exceptions tho.

-- 
tejun

  reply	other threads:[~2008-03-06 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 15:48 Correct use of ap->lock versus ap->host->lock ? Mark Lord
2008-03-06 16:35 ` Jeff Garzik
2008-03-06 17:13   ` Mark Lord
2008-03-06 17:24     ` Mark Lord
2008-03-06 17:41       ` Jeff Garzik
2008-03-06 18:12         ` Jeff Garzik
2008-03-06 23:04           ` Tejun Heo [this message]
2008-03-06 17:28     ` Jeff Garzik
2008-03-06 17:36       ` Mark Lord
2008-03-06 17:57         ` Jeff Garzik
2008-03-06 18:20           ` Mark Lord
2008-03-06 18:24             ` Jeff Garzik
2008-03-07 11:47               ` Andi Kleen

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=47D07861.5030306@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@redhat.com \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --cc=linux-ide@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.