[PATCH tip/core/rcu 0/9] Preview of additional RCU changes for 3.3

November 15th, 2011 - 03:30 pm ET by Paul E. McKenney | Report spam
Hello!

This patchset is in addition to the set previously posted (see
https://lkml.org/lkml/2011/11/2/363). This new set permits the
reworked RCU_FAST_NO_HZ code to be used from TREE_PREEMPT_RCU,
allows rcutorture to shut down the system after a fixed time
period (useful for KVM-based testing), adds an API to
replace the "->pid == 0" discussed in response to the earlier
patch set, and applies this API where applicable. The patches are
as follows:

1. Update the RCU_FAST_NO_HZ config definition to allow it to
be used in TREE_PREEMPT_RCU builds, since that is now legal.
2. Add a module parameter that permit rcutorture to shut down the
system cleanly after the test has run for the specified time.
3. Add a module parameter to allow rcutorture start running
as soon as it is initialized.
4. Add is_idle_task() API to replace open-coded tests of ->pid
against zero.
5-9. Apply the new is_idle_task() API where it makes sense.

For a testing-only version of this patchset from git, please see the
following subject-to-rebase branch:

git://git.kernel.org/pub/scm/linux/...ux-rcu.git rcu/dev

Thanx, Paul



b/Documentation/RCU/torture.txt | 5 +++
b/arch/sparc/kernel/setup_32.c | 2 -
b/arch/tile/mm/fault.c | 4 +-
b/include/linux/sched.h | 1
b/init/Kconfig | 10 +++
b/kernel/debug/kdb/kdb_support.c | 2 -
b/kernel/events/core.c | 2 -
b/kernel/rcutiny.c | 4 +-
b/kernel/rcutorture.c | 62 ++++++++++++++++++++++++++++++++++++
b/kernel/rcutree.c | 4 +-
b/kernel/sched.c | 9 +++++
kernel/rcutorture.c | 2 +
12 files changed, 89 insertions(+), 18 deletions(-)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 26 repliesReplies Make a reply

Replies

#1 Paul E. McKenney
November 15th, 2011 - 03:30 pm ET | Report spam
From: Paul E. McKenney

Change from direct comparison of ->pid with zero to is_idle_task().

Signed-off-by: Paul E. McKenney
Signed-off-by: Paul E. McKenney

kernel/rcutiny.c | 4 ++--
kernel/rcutree.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 4e16ce3..e5bd949 100644
a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -64,7 +64,7 @@ static void rcu_idle_enter_common(long long oldval)
return;
}
RCU_TRACE(trace_rcu_dyntick("Start", oldval, rcu_dynticks_nesting));
- if (current->pid != 0) {
+ if (!is_idle_task(current)) {
struct task_struct *idle = idle_task(smp_processor_id());

RCU_TRACE(trace_rcu_dyntick("Error on entry: not idle task",
@@ -118,7 +118,7 @@ static void rcu_idle_exit_common(long long oldval)
return;
}
RCU_TRACE(trace_rcu_dyntick("End", oldval, rcu_dynticks_nesting));
- if (current->pid != 0) {
+ if (!is_idle_task(current)) {
struct task_struct *idle = idle_task(smp_processor_id());

RCU_TRACE(trace_rcu_dyntick("Error on exit: not idle task",
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 49e0783..7fb8b0e 100644
a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -355,7 +355,7 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
return;
}
trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
- if (current->pid != 0) {
+ if (!is_idle_task(current)) {
struct task_struct *idle = idle_task(smp_processor_id());

trace_rcu_dyntick("Error on entry: not idle task",
@@ -449,7 +449,7 @@ static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
smp_mb__after_atomic_inc(); /* See above. */
WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks) & 0x1));
trace_rcu_dyntick("End", oldval, rdtp->dynticks_nesting);
- if (current->pid != 0) {
+ if (!is_idle_task(current)) {
struct task_struct *idle = idle_task(smp_processor_id());

trace_rcu_dyntick("Error on exit: not idle task",
1.7.3.2

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics