* 3.2-rt build issue with CONFIG_DEBUG_ATOMIC_SLEEP
@ 2013-05-03 3:30 Josh Cartwright
2013-05-03 21:15 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Josh Cartwright @ 2013-05-03 3:30 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-rt-users@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2384 bytes --]
Hey Steven-
It looks like commit 78563280521 ("sched: Check for idle task in
might_sleep()") in the v3.2-rt stable branch has a dependency on
is_idle_task() being defined, which doesn't exist in 3.2.
This causes build breakages with CONFIG_DEBUG_ATOMIC_SLEEP:
kernel/sched.c: In function â__might_sleepâ:
kernel/sched.c:8942:7: error: implicit declaration of function âis_idle_taskâ [-Werror=implicit-function-declaration]
Fortunately, upstream commit c4f30608435 (shown below) is nice and
contained, and can be cherry-picked cleanly.
Thanks,
Josh
--8<--
From: "Paul E. McKenney" <paul.mckenney@linaro.org>
Subject: [PATCH] sched: Add is_idle_task() to handle invalidated uses of idle_cpu()
Commit 908a3283 (Fix idle_cpu()) invalidated some uses of idle_cpu(),
which used to say whether or not the CPU was running the idle task,
but now instead says whether or not the CPU is running the idle task
in the absence of pending wakeups. Although this new implementation
gives a better answer to the question "is this CPU idle?", it also
invalidates other uses that were made of idle_cpu().
This commit therefore introduces a new is_idle_task() API member
that determines whether or not the specified task is one of the
idle tasks, allowing open-coded "->pid == 0" sequences to be replaced
by something more meaningful.
Suggested-by: Josh Triplett <josh@joshtriplett.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/sched.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1c4f3e9..4a7e4d3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2070,6 +2070,14 @@ extern int sched_setscheduler(struct task_struct *, int,
extern int sched_setscheduler_nocheck(struct task_struct *, int,
const struct sched_param *);
extern struct task_struct *idle_task(int cpu);
+/**
+ * is_idle_task - is the specified task an idle task?
+ * @tsk: the task in question.
+ */
+static inline bool is_idle_task(struct task_struct *p)
+{
+ return p->pid == 0;
+}
extern struct task_struct *curr_task(int cpu);
extern void set_curr_task(int cpu, struct task_struct *p);
--
1.8.2.2
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 3.2-rt build issue with CONFIG_DEBUG_ATOMIC_SLEEP
2013-05-03 3:30 3.2-rt build issue with CONFIG_DEBUG_ATOMIC_SLEEP Josh Cartwright
@ 2013-05-03 21:15 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2013-05-03 21:15 UTC (permalink / raw)
To: Josh Cartwright; +Cc: linux-rt-users@vger.kernel.org
On Thu, 2013-05-02 at 22:30 -0500, Josh Cartwright wrote:
> Hey Steven-
>
> It looks like commit 78563280521 ("sched: Check for idle task in
> might_sleep()") in the v3.2-rt stable branch has a dependency on
> is_idle_task() being defined, which doesn't exist in 3.2.
>
> This causes build breakages with CONFIG_DEBUG_ATOMIC_SLEEP:
>
> kernel/sched.c: In function â__might_sleepâ:
> kernel/sched.c:8942:7: error: implicit declaration of function âis_idle_taskâ [-Werror=implicit-function-declaration]
>
> Fortunately, upstream commit c4f30608435 (shown below) is nice and
> contained, and can be cherry-picked cleanly.
>
Thanks, I'll apply it to my next release.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-03 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03 3:30 3.2-rt build issue with CONFIG_DEBUG_ATOMIC_SLEEP Josh Cartwright
2013-05-03 21:15 ` Steven Rostedt
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).