From: doug lkml <doug.lkml@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Query about might_sleep()
Date: Thu, 27 Feb 2014 09:07:39 +0530 [thread overview]
Message-ID: <CALY8T6oeYa1142DsqNw7H5E6NvgrdrzXGhcxMO5=LXR47JheMQ@mail.gmail.com> (raw)
In-Reply-To: <20140226215506.246b9124@gandalf.local.home>
Steven,
> In -rt, we convert all spin_locks() into rt_mutex() which means they
> might sleep on contention. We do not convert raw_spin_locks(), they
> stay the same both in mainline and -rt.
>
> The following is OK:
>
> rt_mutex()
> __might_sleep()
> some_function()
> local_irq_save()
> local_irq_restore()
>
> Indention show what calls what.
>
> But if you have:
>
> local_irq_save()
> some_function();
> rt_mutex();
> local_irq_restore();
>
> Now the above *is* a bug.
>
> Is that what you are asking?
>
I think I quoted my example incorrectly.
I put it across as a stack trace, rather than the way you've put it across.
Here's what I had in mind,
local_irq_save();
some_function();
rt_spin_lock() --> this calls __might_sleep
local_irq_restore(); --> In this case there's a bug right?
- Doug
next prev parent reply other threads:[~2014-02-27 3:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 6:55 Query about might_sleep() doug lkml
2014-02-27 2:55 ` Steven Rostedt
2014-02-27 3:37 ` doug lkml [this message]
2014-02-27 3:50 ` Steven Rostedt
2014-02-27 4:18 ` doug lkml
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='CALY8T6oeYa1142DsqNw7H5E6NvgrdrzXGhcxMO5=LXR47JheMQ@mail.gmail.com' \
--to=doug.lkml@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.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).