From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
RT <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 1/6] preempt_lazy: remove redundant test_thread_flag() call
Date: Fri, 9 May 2014 15:17:47 +0200 [thread overview]
Message-ID: <20140509131747.GG29014@linutronix.de> (raw)
In-Reply-To: <1399354431.5192.67.camel@marge.simpson.net>
* Mike Galbraith | 2014-05-06 07:33:51 [+0200]:
>> Hmm, do all archs check? Perhaps we need to also update
>> include/asm-generic/preempt.h?
>
>Per cpu preempt_count is x86, and tif_need_resched() handles laziness,
>so all should be well. Did I just manage to overlook the obvious for
>the second time?
In include/asm-generic/preempt.h we have
| static __always_inline bool __preempt_count_dec_and_test(void)
| {
| return !--*preempt_count_ptr() && tif_need_resched();
| }
and tif_need_resched() is in include/linux/thread_info.h
| #ifdef CONFIG_PREEMPT_LAZY
| #define tif_need_resched() (test_thread_flag(TIF_NEED_RESCHED) || \
| test_thread_flag(TIF_NEED_RESCHED_LAZY))
| #else
| #define tif_need_resched() (test_thread_flag(TIF_NEED_RESCHED))
| #endif
So I guess we are fine.
>-Mike
Sebastian
next prev parent reply other threads:[~2014-05-09 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1399020080.5233.96.camel@marge.simpson.net>
2014-05-02 11:12 ` [patch 1/6] preempt_lazy: remove redundant test_thread_flag() call Mike Galbraith
2014-05-06 2:37 ` Steven Rostedt
2014-05-06 5:33 ` Mike Galbraith
2014-05-09 13:17 ` Sebastian Andrzej Siewior [this message]
2014-05-02 11:12 ` [patch 2/6] x86/preempt-lazy adapt implementation to percpu __preempt_count Mike Galbraith
2014-05-02 11:13 ` [patch 3/6] stomp-machine: fix typo in kernel/cpu.c Mike Galbraith
2014-05-02 11:13 ` [patch 4/6] stomp-machine: fix typo in kernel/stop_machine.c Mike Galbraith
2014-05-02 11:13 ` [patch 5/6] stomp-machine: create lg_global_trylock_relax() primitive Mike Galbraith
2014-05-02 11:13 ` [patch 6/6] stomp-machine: use lg_global_trylock_relax() to dead with stop_cpus_lock lglock Mike Galbraith
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=20140509131747.GG29014@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.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;
as well as URLs for NNTP newsgroup(s).