From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@kernel.org
Subject: Re: preempt_check_resched() gone?
Date: Fri, 7 Mar 2014 14:14:23 +0200 [thread overview]
Message-ID: <20140307121423.GI3852@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1403062146060.18573@ionos.tec.linutronix.de>
On Thu, Mar 06, 2014 at 09:52:42PM +0100, Thomas Gleixner wrote:
> On Thu, 6 Mar 2014, Ville Syrjälä wrote:
> > Hi,
> >
> > It appears preempt_check_resched() is no longer available for modules
> > since [1]. So now I'm left wondering what is one supposed to use after
> > local_irq_enable(). Documentation/preempt-locking.txt still says one
> > should do a check, but the tool to do that was taken away.
>
> The documentation is slightly misleading. The point is:
>
> If you have an irq disabled section and you do a wakeup inside this
> section which causes the need resched bit to be set, then
> local_irq_enable/restore wont do an preemption check.
>
> If you merily poke at a few device registers then nothing will set
> need resched and you're good.
OK. There are a few extra things that get called while irqs are
disabled: prepare_to_wait(), finish_wait(), mod_timer(),
spin_{lock,unlock}(). Based on a quick glance none of those should
do anything I need to worry about, so I'll just drop
preempt_check_resched() from my code.
Thanks.
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2014-03-07 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 20:27 preempt_check_resched() gone? Ville Syrjälä
2014-03-06 20:52 ` Thomas Gleixner
2014-03-07 12:14 ` Ville Syrjälä [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=20140307121423.GI3852@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.