From: Sahitya Tummala <stummala@codeaurora.org>
To: Daniel Walker <dwalker@codeaurora.org>
Cc: cjb@laptop.org, linux-mmc@vger.kernel.org, san@google.com,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH V2 1/5] mmc: msm_sdcc: Fix possible circular locking dependency warning
Date: Thu, 09 Dec 2010 20:51:58 +0530 [thread overview]
Message-ID: <1291908118.21924.69.camel@stummala-linux.in.qualcomm.com> (raw)
In-Reply-To: <1291832726.12568.5.camel@c-dwalke-linux.qualcomm.com>
Hi Daniel,
On Wed, 2010-12-08 at 10:25 -0800, Daniel Walker wrote:
> On Wed, 2010-12-08 at 15:03 +0530, Sahitya Tummala wrote:
> > In the context of request processing thread, data mover lock is
> > acquired after the host lock. In another context, in the completion
> > handler of data mover the locks are acquired in the reverse order,
> > resulting in possible circular lock dependency warning. Hence,
> > schedule a tasklet to process the dma completion so as to avoid
> > nested locks.
> >
>
> Can you just alter the location where the locks are taken ?
>
> This lock,
>
> spin_lock_irqsave(&host->lock, flags);
>
> seems not fine grained at all .. That lock is just being held over very
> large sections of code which it doesn't seems like it needs to be. It
> doesn't appear to be protecting just the data structures.
Yes, it seems we are using the lock in this function not just for
required host data.
But to solve this circular locking issue, it looks like we don't need
host lock before enqueing the data mover request. I will analyze more
and confirm.
--
Thanks,
Sahitya.
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum.
prev parent reply other threads:[~2010-12-09 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 9:33 [PATCH V2 1/5] mmc: msm_sdcc: Fix possible circular locking dependency warning Sahitya Tummala
2010-12-08 9:33 ` [PATCH V2 2/5] mmc: msm_sdcc: Add prog done interrupt support Sahitya Tummala
2010-12-08 9:33 ` [PATCH V2 3/5] mmc: msm_sdcc: Reset SDCC in case of data transfer errors Sahitya Tummala
2010-12-08 9:33 ` [PATCH V2 4/5] mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned Sahitya Tummala
2010-12-08 9:33 ` [PATCH V2 5/5] mmc: msm_sdcc: Check for only DATA_END interrupt to end a request Sahitya Tummala
2010-12-08 18:25 ` [PATCH V2 1/5] mmc: msm_sdcc: Fix possible circular locking dependency warning Daniel Walker
2010-12-09 15:21 ` Sahitya Tummala [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=1291908118.21924.69.camel@stummala-linux.in.qualcomm.com \
--to=stummala@codeaurora.org \
--cc=cjb@laptop.org \
--cc=dwalker@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=san@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox