From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Bill Gatliff <bgat-uPd5UNENI//N9NzbbXoYwQ@public.gmane.org>
Cc: Stephane Grosjean
<s.grosjean-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Questions about i2c_transfer() usage in timer context...
Date: Mon, 20 Feb 2012 15:13:01 +0100 [thread overview]
Message-ID: <20120220151301.6ca4db1f@endymion.delvare> (raw)
In-Reply-To: <CADkCAusvXZC5Ju2oNbBgi6aZO2E9upoDPbtFqTbrbBhd8eCu8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Bill,
On Mon, 20 Feb 2012 07:46:07 -0600, Bill Gatliff wrote:
> On Feb 20, 2012 7:11 AM, "Jean Delvare" <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> > On Mon, 20 Feb 2012 14:01:52 +0100, Stephane Grosjean wrote:
> > > I'm facing a deadlock regarding a timer callback...
> >
> > Depends on the underlying I2C adapter driver. One of the sleep causes
> > is indeed the acquisition of the mutex in i2c_transfer(). However the
> > function then calls a driver specific callback function
> > (adap->algo->master_xfer) which may or may not sleep too depending on
> > the implementation.
>
> Indeed. A fair number of the i2c transfer functions I have encountered call
> schedule_work() or equivalent, and/or wait_for_completion().
Or even plain msleep().
> The low-level transfer function implementations are entirely
> platform-dependent, and often lean heavily on the assumption that they
> aren't called in atomic contexts. So in addition to driving architecture
> decisions in your code which calls them, they can also have implications
> for real-time performance.
>
> None of the above is a complaint, mind you. Just observations. :)
I certainly hope you wouldn't dare to complain without also submitting
a proposal and a patch set addressing any issue you have ;)
--
Jean Delvare
prev parent reply other threads:[~2012-02-20 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 13:01 Questions about i2c_transfer() usage in timer context Stephane Grosjean
[not found] ` <4F424440.300-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.org>
2012-02-20 13:11 ` Jean Delvare
[not found] ` <20120220141112.1e633beb-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-02-20 13:19 ` Stephane Grosjean
[not found] ` <CADkCAusvXZC5Ju2oNbBgi6aZO2E9upoDPbtFqTbrbBhd8eCu8A@mail.gmail.com>
[not found] ` <CADkCAusvXZC5Ju2oNbBgi6aZO2E9upoDPbtFqTbrbBhd8eCu8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-20 14:13 ` Jean Delvare [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=20120220151301.6ca4db1f@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=bgat-uPd5UNENI//N9NzbbXoYwQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=s.grosjean-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).