Skip to contentSkip to conversation

rcu: Make new RCU dynticks API work with nohz cpusets

PATCH Applied Frederic Weisbecker 3 participants 22 messages Nov 28, 2011 – Nov 29, 2011

lore
Share & tools
lore
#0 lore raw

cover rcu: Make new RCU dynticks API work with nohz cpusets

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

 kernel/rcutree.c |  117 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 88 insertions(+), 29 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/4 rcu: Don't check irq nesting from rcu idle entry/exit

rcu_idle_enter() and rcu_idle_exit() don't need to check the irq nesting as they are not called from irq.

Only check dyntick_nesting from rcu_irq_enter() and rcu_irq_exit().

---
 kernel/rcutree.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
kernel/rcutree.c +8 -10
index 28f8f92..c2aaadf 100644
@@ -350,10 +350,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 {
-	if (rdtp->dynticks_nesting) {
-		trace_rcu_dyntick("--=", rdtp->dynticks_nesting);
-		return;
-	}
 	trace_rcu_dyntick("Start", rdtp->dynticks_nesting);
 	if (!idle_cpu(smp_processor_id())) {
 		WARN_ON_ONCE(1);	/* must be idle task! */
@@ -417,7 +413,10 @@ void rcu_irq_exit(void)
 	rdtp = &__get_cpu_var(rcu_dynticks);
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	rcu_idle_enter_common(rdtp);
+	if (rdtp->dynticks_nesting)
+		trace_rcu_dyntick("--=", rdtp->dynticks_nesting);
+	else
+		rcu_idle_enter_common(rdtp);
 	local_irq_restore(flags);
 }
 
@@ -430,10 +429,6 @@ void rcu_irq_exit(void)
  */
 static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (oldval) {
-		trace_rcu_dyntick("++=", rdtp->dynticks_nesting);
-		return;
-	}
 	smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
 	atomic_inc(&rdtp->dynticks);
 	/* CPUs seeing atomic_inc() must see later RCU read-side crit sects */
@@ -503,7 +498,10 @@ void rcu_irq_enter(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
-	rcu_idle_exit_common(rdtp, oldval);
+	if (oldval)
+		trace_rcu_dyntick("++=", rdtp->dynticks_nesting);
+	else
+		rcu_idle_exit_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [PATCH 1/4] rcu: Don't check irq nesting from rcu idle entry/exit

Quoted 11 lines · Frederic Weisbecker

rcu_idle_enter() and rcu_idle_exit() don't need to check the irq nesting as they are not called from irq.

Only check dyntick_nesting from rcu_irq_enter() and rcu_irq_exit().

---
 kernel/rcutree.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

I have queued this. I had to update it to deal with a recent conflicting update, please see below for the new version.

Thanx, Paul

------------------------------------------------------------------------

rcu: Don't check irq nesting from rcu idle entry/exit

Because tasks do not nest, rcu_idle_enter() and rcu_idle_exit() do not need to check for nesting. This commit therefore moves nesting checks from rcu_idle_enter_common() to rcu_irq_exit() and from rcu_idle_exit_common() to rcu_irq_enter().

kernel/rcutree.c +8 -9
index bf085d7..54d9b4f 100644
@@ -350,10 +350,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (rdtp->dynticks_nesting) {
-		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
@@ -426,7 +422,10 @@ void rcu_irq_exit(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	rcu_idle_enter_common(rdtp, oldval);
+	if (rdtp->dynticks_nesting)
+		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_enter_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
@@ -439,10 +438,6 @@ void rcu_irq_exit(void)
  */
 static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (oldval) {
-		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
 	atomic_inc(&rdtp->dynticks);
 	/* CPUs seeing atomic_inc() must see later RCU read-side crit sects */
@@ -519,6 +514,10 @@ void rcu_irq_enter(void)
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
 	rcu_idle_exit_common(rdtp, oldval);
+	if (oldval)
+		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_exit_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
#3 lore raw

Re: [PATCH 1/4] rcu: Don't check irq nesting from rcu idle entry/exit

Quoted 13 lines · Paul E. McKenney
Quoted 11 lines · Frederic Weisbecker

rcu_idle_enter() and rcu_idle_exit() don't need to check the irq nesting as they are not called from irq.

Only check dyntick_nesting from rcu_irq_enter() and rcu_irq_exit().

---
 kernel/rcutree.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
Quoted 4 lines

I have queued this. I had to update it to deal with a recent conflicting update, please see below for the new version.

Thanx, Paul

Hmm, seems there is a problem. Look below:

Quoted 53 lines

------------------------------------------------------------------------

rcu: Don't check irq nesting from rcu idle entry/exit

Because tasks do not nest, rcu_idle_enter() and rcu_idle_exit() do not need to check for nesting. This commit therefore moves nesting checks from rcu_idle_enter_common() to rcu_irq_exit() and from rcu_idle_exit_common() to rcu_irq_enter().

kernel/rcutree.c +4 -9
index bf085d7..54d9b4f 100644
@@ -350,10 +350,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (rdtp->dynticks_nesting) {
-		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
@@ -426,7 +422,10 @@ void rcu_irq_exit(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	rcu_idle_enter_common(rdtp, oldval);
+	if (rdtp->dynticks_nesting)
+		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_enter_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
@@ -439,10 +438,6 @@ void rcu_irq_exit(void)
  */
 static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (oldval) {
-		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
 	atomic_inc(&rdtp->dynticks);
 	/* CPUs seeing atomic_inc() must see later RCU read-side crit sects */

kernel/rcutree.c void rcu_irq_enter(void) · line 516

Quoted 3 lines
kernel/rcutree.c +0 -0
@@ -519,6 +514,10 @@ void rcu_irq_enter(void)
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
 	rcu_idle_exit_common(rdtp, oldval);

It's now calling rcu_idle_exit_common twice?

Quoted 8 lines
kernel/rcutree.c +4 -0
+	if (oldval)
+		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_exit_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
#4 lore raw

Re: [PATCH 1/4] rcu: Don't check irq nesting from rcu idle entry/exit

Quoted 14 lines · Frederic Weisbecker
Quoted 13 lines · Paul E. McKenney
Quoted 11 lines · Frederic Weisbecker

rcu_idle_enter() and rcu_idle_exit() don't need to check the irq nesting as they are not called from irq.

Only check dyntick_nesting from rcu_irq_enter() and rcu_irq_exit().

---
 kernel/rcutree.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
Quoted 6 lines
Quoted 4 lines

I have queued this. I had to update it to deal with a recent conflicting update, please see below for the new version.

Thanx, Paul

Hmm, seems there is a problem. Look below:

Good eyes! How about the following instead?

------------------------------------------------------------------------

rcu: Don't check irq nesting from rcu idle entry/exit

Because tasks do not nest, rcu_idle_enter() and rcu_idle_exit() do not need to check for nesting. This commit therefore moves nesting checks from rcu_idle_enter_common() to rcu_irq_exit() and from rcu_idle_exit_common() to rcu_irq_enter().

kernel/rcutree.c +8 -10
index bf085d7..860c02c 100644
@@ -350,10 +350,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (rdtp->dynticks_nesting) {
-		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
@@ -426,7 +422,10 @@ void rcu_irq_exit(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	rcu_idle_enter_common(rdtp, oldval);
+	if (rdtp->dynticks_nesting)
+		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_enter_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
@@ -439,10 +438,6 @@ void rcu_irq_exit(void)
  */
 static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (oldval) {
-		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
 	atomic_inc(&rdtp->dynticks);
 	/* CPUs seeing atomic_inc() must see later RCU read-side crit sects */
@@ -518,7 +513,10 @@ void rcu_irq_enter(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
-	rcu_idle_exit_common(rdtp, oldval);
+	if (oldval)
+		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_exit_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
#5 lore raw

Re: [PATCH 1/4] rcu: Don't check irq nesting from rcu idle entry/exit

Quoted 15 lines · Paul E. McKenney
Quoted 14 lines · Frederic Weisbecker
Quoted 13 lines · Paul E. McKenney
Quoted 11 lines · Frederic Weisbecker

rcu_idle_enter() and rcu_idle_exit() don't need to check the irq nesting as they are not called from irq.

Only check dyntick_nesting from rcu_irq_enter() and rcu_irq_exit().

---
 kernel/rcutree.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

I have queued this. I had to update it to deal with a recent conflicting update, please see below for the new version.

Thanx, Paul

Hmm, seems there is a problem. Look below:

Good eyes!

A real falcon!

Quoted 1 line

How about the following instead?

Yeah looks good.

Thanks!

Quoted 65 lines

------------------------------------------------------------------------

rcu: Don't check irq nesting from rcu idle entry/exit

Because tasks do not nest, rcu_idle_enter() and rcu_idle_exit() do not need to check for nesting. This commit therefore moves nesting checks from rcu_idle_enter_common() to rcu_irq_exit() and from rcu_idle_exit_common() to rcu_irq_enter().

kernel/rcutree.c +8 -10
index bf085d7..860c02c 100644
@@ -350,10 +350,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (rdtp->dynticks_nesting) {
-		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
@@ -426,7 +422,10 @@ void rcu_irq_exit(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	rcu_idle_enter_common(rdtp, oldval);
+	if (rdtp->dynticks_nesting)
+		trace_rcu_dyntick("--=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_enter_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
@@ -439,10 +438,6 @@ void rcu_irq_exit(void)
  */
 static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	if (oldval) {
-		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
-		return;
-	}
 	smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
 	atomic_inc(&rdtp->dynticks);
 	/* CPUs seeing atomic_inc() must see later RCU read-side crit sects */
@@ -518,7 +513,10 @@ void rcu_irq_enter(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
-	rcu_idle_exit_common(rdtp, oldval);
+	if (oldval)
+		trace_rcu_dyntick("++=", oldval, rdtp->dynticks_nesting);
+	else
+		rcu_idle_exit_common(rdtp, oldval);
 	local_irq_restore(flags);
 }
 
#6 lore raw

PATCH 2/4 rcu: Irq nesting is always 0 on rcu_enter_idle_common

In reply to Frederic Weisbecker

So pass 0 directly as a nesting value on the tracing calls.

---
 kernel/rcutree.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
kernel/rcutree.c +2 -3
index c2aaadf..b80cb41 100644
@@ -350,11 +350,10 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 {
-	trace_rcu_dyntick("Start", rdtp->dynticks_nesting);
+	trace_rcu_dyntick("Start", 0);
 	if (!idle_cpu(smp_processor_id())) {
 		WARN_ON_ONCE(1);	/* must be idle task! */
-		trace_rcu_dyntick("Error on entry: not idle task",
-				   rdtp->dynticks_nesting);
+		trace_rcu_dyntick("Error on entry: not idle task", 0);
 		ftrace_dump(DUMP_ALL);
 	}
 	/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
Signature · 1 line
1.7.5.4
#7 lore raw

Re: [PATCH 2/4] rcu: Irq nesting is always 0 on rcu_enter_idle_common

Quoted 16 lines · Frederic Weisbecker

So pass 0 directly as a nesting value on the tracing calls.

---
 kernel/rcutree.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
kernel/rcutree.c +0 -0
index c2aaadf..b80cb41 100644
@@ -350,11 +350,10 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 {

kernel/rcutree.c static int rcu_implicit_offline_qs(struct rcu_data *rdp) · line 359

Quoted 10 lines
kernel/rcutree.c +2 -3
-	trace_rcu_dyntick("Start", rdtp->dynticks_nesting);
+	trace_rcu_dyntick("Start", 0);
 	if (!idle_cpu(smp_processor_id())) {
 		WARN_ON_ONCE(1);	/* must be idle task! */
-		trace_rcu_dyntick("Error on entry: not idle task",
-				   rdtp->dynticks_nesting);
+		trace_rcu_dyntick("Error on entry: not idle task", 0);
 		ftrace_dump(DUMP_ALL);
 	}
 	/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */

Queued, again updating to work around the mid-air collision.

Thanx, Paul

------------------------------------------------------------------------

rcu: Irq nesting is always 0 on rcu_enter_idle_common

Because tasks don't nest, the ->dyntick_nesting must always be zero upon entry to rcu_idle_enter_common(). Therefore, pass "0" rather than the counter itself.

kernel/rcutree.c +2 -3
index 54d9b4f..e0f5072 100644
@@ -350,12 +350,11 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
+	trace_rcu_dyntick("Start", oldval, 0);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
 
-		trace_rcu_dyntick("Error on entry: not idle task",
-				   oldval, rdtp->dynticks_nesting);
+		trace_rcu_dyntick("Error on entry: not idle task", oldval, 0);
 		ftrace_dump(DUMP_ALL);
 		WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s",
 			  current->pid, current->comm,
#8 lore raw

Re: [PATCH 2/4] rcu: Irq nesting is always 0 on rcu_enter_idle_common

Quoted 32 lines · Paul E. McKenney
Quoted 16 lines · Frederic Weisbecker

So pass 0 directly as a nesting value on the tracing calls.

---
 kernel/rcutree.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
kernel/rcutree.c +0 -0
index c2aaadf..b80cb41 100644
@@ -350,11 +350,10 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 {

kernel/rcutree.c static int rcu_implicit_offline_qs(struct rcu_data *rdp) · line 359

Quoted 10 lines
kernel/rcutree.c +2 -3
-	trace_rcu_dyntick("Start", rdtp->dynticks_nesting);
+	trace_rcu_dyntick("Start", 0);
 	if (!idle_cpu(smp_processor_id())) {
 		WARN_ON_ONCE(1);	/* must be idle task! */
-		trace_rcu_dyntick("Error on entry: not idle task",
-				   rdtp->dynticks_nesting);
+		trace_rcu_dyntick("Error on entry: not idle task", 0);
 		ftrace_dump(DUMP_ALL);
 	}
 	/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */

Queued, again updating to work around the mid-air collision.

Thanx, Paul

Quoted 7 lines

------------------------------------------------------------------------

rcu: Irq nesting is always 0 on rcu_enter_idle_common

Because tasks don't nest, the ->dyntick_nesting must always be zero upon entry to rcu_idle_enter_common(). Therefore, pass "0" rather than the counter itself.

And with a better changelog.

Thanks!

Quoted 25 lines
kernel/rcutree.c +2 -3
index 54d9b4f..e0f5072 100644
@@ -350,12 +350,11 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
  */
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
 {
-	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
+	trace_rcu_dyntick("Start", oldval, 0);
 	if (!is_idle_task(current)) {
 		struct task_struct *idle = idle_task(smp_processor_id());
 
-		trace_rcu_dyntick("Error on entry: not idle task",
-				   oldval, rdtp->dynticks_nesting);
+		trace_rcu_dyntick("Error on entry: not idle task", oldval, 0);
 		ftrace_dump(DUMP_ALL);
 		WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s",
 			  current->pid, current->comm,
#9 lore raw

RFC PATCH 3/4 rcu: New rcu_user_enter() and rcu_user_exit() APIs

In reply to Frederic Weisbecker

These two APIs are provided to help the implementation of an adaptive tickless kernel (cf: nohz cpusets). We need to run into RCU extended quiescent state when we are in userland so that a tickless CPU is not involved in the global RCU state machine and can shutdown its tick safely.

These APIs are called from syscall and exception entry/exit points and can't be called from interrupt.

They are essentially the same than rcu_idle_enter() and rcu_idle_exit() minus the checks that ensure the CPU is running the idle task.

---
 kernel/rcutree.c |   98 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 68 insertions(+), 30 deletions(-)
kernel/rcutree.c +68 -30
index b80cb41..00a9fba 100644
@@ -341,6 +341,15 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
 
 #endif /* #ifdef CONFIG_SMP */
 
+static void rcu_check_idle_enter(void)
+{
+	if (!idle_cpu(smp_processor_id())) {
+		WARN_ON_ONCE(1);	/* must be idle task! */
+		trace_rcu_dyntick("Error on entry: not idle task", 0);
+		ftrace_dump(DUMP_ALL);
+	}
+}
+
 /*
  * rcu_idle_enter_common - inform RCU that current CPU is moving towards idle
  *
@@ -351,11 +360,6 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp)
 static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 {
 	trace_rcu_dyntick("Start", 0);
-	if (!idle_cpu(smp_processor_id())) {
-		WARN_ON_ONCE(1);	/* must be idle task! */
-		trace_rcu_dyntick("Error on entry: not idle task", 0);
-		ftrace_dump(DUMP_ALL);
-	}
 	/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
 	smp_mb__before_atomic_inc();  /* See above. */
 	atomic_inc(&rdtp->dynticks);
@@ -363,6 +367,18 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
 	WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1);
 }
 
+static void __rcu_idle_enter(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	rdtp->dynticks_nesting = 0;
+	rcu_idle_enter_common(rdtp);
+	local_irq_restore(flags);
+}
+
 /**
  * rcu_idle_enter - inform RCU that current CPU is entering idle
  *
@@ -377,14 +393,13 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp)
  */
 void rcu_idle_enter(void)
 {
-	unsigned long flags;
-	struct rcu_dynticks *rdtp;
+	__rcu_idle_enter();
+	rcu_check_idle_enter();
+}
 
-	local_irq_save(flags);
-	rdtp = &__get_cpu_var(rcu_dynticks);
-	rdtp->dynticks_nesting = 0;
-	rcu_idle_enter_common(rdtp);
-	local_irq_restore(flags);
+void rcu_user_enter(void)
+{
+	__rcu_idle_enter();
 }
 
 /**
@@ -412,13 +427,24 @@ void rcu_irq_exit(void)
 	rdtp = &__get_cpu_var(rcu_dynticks);
 	rdtp->dynticks_nesting--;
 	WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
-	if (rdtp->dynticks_nesting)
+	if (rdtp->dynticks_nesting) {
 		trace_rcu_dyntick("--=", rdtp->dynticks_nesting);
-	else
+	} else {
 		rcu_idle_enter_common(rdtp);
+		rcu_check_idle_enter();
+	}
 	local_irq_restore(flags);
 }
 
+static void rcu_check_idle_exit(long long oldval)
+{
+	if (!idle_cpu(smp_processor_id())) {
+		WARN_ON_ONCE(1);	/* must be idle task! */
+		trace_rcu_dyntick("Error on exit: not idle task", oldval);
+		ftrace_dump(DUMP_ALL);
+	}
+}
+
 /*
  * rcu_idle_exit_common - inform RCU that current CPU is moving away from idle
  *
@@ -434,11 +460,23 @@ 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);
-	if (!idle_cpu(smp_processor_id())) {
-		WARN_ON_ONCE(1);	/* must be idle task! */
-		trace_rcu_dyntick("Error on exit: not idle task", oldval);
-		ftrace_dump(DUMP_ALL);
-	}
+}
+
+static long long __rcu_idle_exit(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+	long long oldval;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	oldval = rdtp->dynticks_nesting;
+	WARN_ON_ONCE(oldval != 0);
+	rdtp->dynticks_nesting = LLONG_MAX / 2;
+	rcu_idle_exit_common(rdtp, oldval);
+	local_irq_restore(flags);
+
+	return oldval;
 }
 
 /**
@@ -454,17 +492,15 @@ static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
  */
 void rcu_idle_exit(void)
 {
-	unsigned long flags;
-	struct rcu_dynticks *rdtp;
 	long long oldval;
 
-	local_irq_save(flags);
-	rdtp = &__get_cpu_var(rcu_dynticks);
-	oldval = rdtp->dynticks_nesting;
-	WARN_ON_ONCE(oldval != 0);
-	rdtp->dynticks_nesting = LLONG_MAX / 2;
-	rcu_idle_exit_common(rdtp, oldval);
-	local_irq_restore(flags);
+	oldval = __rcu_idle_exit();
+	rcu_check_idle_exit(oldval);
+}
+
+void rcu_user_exit(void)
+{
+	__rcu_idle_exit();
 }
 
 /**
@@ -497,10 +533,12 @@ void rcu_irq_enter(void)
 	oldval = rdtp->dynticks_nesting;
 	rdtp->dynticks_nesting++;
 	WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
-	if (oldval)
+	if (oldval) {
 		trace_rcu_dyntick("++=", rdtp->dynticks_nesting);
-	else
+	} else {
+		rcu_check_idle_exit(oldval);
 		rcu_idle_exit_common(rdtp, oldval);
+	}
 	local_irq_restore(flags);
 }
 
Signature · 1 line
1.7.5.4
#10 lore raw

RFC PATCH 4/4 rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

In reply to Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Typically, RCU enters the extended quiescent state when we resume to userspace through a syscall or exception exit, this is done using rcu_user_enter(). Then RCU exit this state by calling rcu_user_exit() from syscall or exception entry.

However there are two other points where we may want to enter or exit this state. Some remote CPU may require a tickless CPU to restart its tick for any reason and send it an IPI for this purpose. As we restart the tick, we don't want to resume from the IPI in RCU extended quiescent state anymore. Similarly we may stop the tick from an interrupt in userspace and we need to be able to enter RCU extended quiescent state when we resume from this interrupt to userspace.

To these ends, we provide two new APIs:

- rcu_user_enter_irq(). This must be called from a non-nesting interrupt betwenn rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll run into RCU extended quiescent state.

- rcu_user_exit_irq(). This must be called from a non-nesting interrupt, interrupting an RCU extended quiescent state, and between rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll prevent from resuming the RCU extended quiescent.

---
 kernel/rcutree.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
kernel/rcutree.c +24 -0
index 00a9fba..a7906c9 100644
@@ -402,6 +402,18 @@ void rcu_user_enter(void)
 	__rcu_idle_enter();
 }
 
+void rcu_user_enter_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting == 1);
+	rdtp->dynticks_nesting = 1;
+	local_irq_restore(flags);
+}
+
 /**
  * rcu_irq_exit - inform RCU that current CPU is exiting irq towards idle
  *
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
+	local_irq_restore(flags);
+}
+
 /**
  * rcu_irq_enter - inform RCU that current CPU is entering irq away from idle
  *
Signature · 1 line
1.7.5.4
#11 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

Quoted 21 lines

Typically, RCU enters the extended quiescent state when we resume to userspace through a syscall or exception exit, this is done using rcu_user_enter(). Then RCU exit this state by calling rcu_user_exit() from syscall or exception entry.

However there are two other points where we may want to enter or exit this state. Some remote CPU may require a tickless CPU to restart its tick for any reason and send it an IPI for this purpose. As we restart the tick, we don't want to resume from the IPI in RCU extended quiescent state anymore. Similarly we may stop the tick from an interrupt in userspace and we need to be able to enter RCU extended quiescent state when we resume from this interrupt to userspace.

To these ends, we provide two new APIs:

- rcu_user_enter_irq(). This must be called from a non-nesting interrupt betwenn rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll run into RCU extended quiescent state.

Quoted 5 lines

- rcu_user_exit_irq(). This must be called from a non-nesting interrupt, interrupting an RCU extended quiescent state, and between rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll prevent from resuming the RCU extended quiescent.

It would help to see the corresponding patches making use of this new API.

Quoted 35 lines
---
 kernel/rcutree.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
kernel/rcutree.c +14 -0
index 00a9fba..a7906c9 100644
@@ -402,6 +402,18 @@ void rcu_user_enter(void)
 	__rcu_idle_enter();
 }
 
+void rcu_user_enter_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting == 1);
+	rdtp->dynticks_nesting = 1;
+	local_irq_restore(flags);
+}
+
 /**
  * rcu_irq_exit - inform RCU that current CPU is exiting irq towards idle
  *
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{

kernel/rcutree.c void rcu_user_exit(void) · line 529

Quoted 10 lines
kernel/rcutree.c +10 -0
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
+	local_irq_restore(flags);
+}
+

Any chance that either of these two needs a memory barrier of some kind, to prevent leakage of operations from between them? Or can you count on no RCU-protected operations occurring during (or leaking into) the extended quiescent state?

- Josh Triplett

#12 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 7 lines · Josh Triplett
Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

I am a fan, also. ;-)

[ . . . ]

Quoted 13 lines
Quoted 13 lines
kernel/rcutree.c +9 -0
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
Quoted 8 lines

kernel/rcutree.c void rcu_user_enter(void) · line 416

Quoted 3 lines
kernel/rcutree.c +3 -0
+	local_irq_restore(flags);
+}
+

Any chance that either of these two needs a memory barrier of some kind, to prevent leakage of operations from between them? Or can you count on no RCU-protected operations occurring during (or leaking into) the extended quiescent state?

There is no need for a memory barrier on rdtp->dynticks_nesting because it is used (aside from state dumping) only by the local CPU. In contrast, changes to ->dynticks are visible to other CPUs, hence the memory barriers around changes to ->dynticks.

Information flows within the CPU from ->dynticks_nesting to ->dynticks, which is externally visible.

Frederic, given my hamhandedness on the first patch and given that you mentioned its being less time critical, I will let you forward port patches #3 and #4. I have pushed the first two patches to -rcu, branch rcu/dyntick. I will be testing over the evening.

Thanx, Paul

Reviewed-by
#13 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 35 lines · Paul E. McKenney
Quoted 7 lines · Josh Triplett
Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

I am a fan, also. ;-)

[ . . . ]

Quoted 13 lines
Quoted 13 lines
kernel/rcutree.c +9 -0
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
Quoted 8 lines

kernel/rcutree.c void rcu_user_enter(void) · line 416

Quoted 3 lines
kernel/rcutree.c +3 -0
+	local_irq_restore(flags);
+}
+

Any chance that either of these two needs a memory barrier of some kind, to prevent leakage of operations from between them? Or can you count on no RCU-protected operations occurring during (or leaking into) the extended quiescent state?

Quoted 7 lines

There is no need for a memory barrier on rdtp->dynticks_nesting because it is used (aside from state dumping) only by the local CPU. In contrast, changes to ->dynticks are visible to other CPUs, hence the memory barriers around changes to ->dynticks.

Information flows within the CPU from ->dynticks_nesting to ->dynticks, which is externally visible.

Thanks for the clarification; just wanted to make sure I understood the various data involved here.

Now that I understand that:

#14 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

In reply to Paul E. McKenney
Quoted 40 lines · Paul E. McKenney
Quoted 7 lines · Josh Triplett
Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

I am a fan, also. ;-)

[ . . . ]

Quoted 13 lines
Quoted 13 lines
kernel/rcutree.c +9 -0
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
Quoted 8 lines

kernel/rcutree.c void rcu_user_enter(void) · line 416

Quoted 3 lines
kernel/rcutree.c +3 -0
+	local_irq_restore(flags);
+}
+

Any chance that either of these two needs a memory barrier of some kind, to prevent leakage of operations from between them? Or can you count on no RCU-protected operations occurring during (or leaking into) the extended quiescent state?

There is no need for a memory barrier on rdtp->dynticks_nesting because it is used (aside from state dumping) only by the local CPU. In contrast, changes to ->dynticks are visible to other CPUs, hence the memory barriers around changes to ->dynticks.

Quoted 7 lines

Information flows within the CPU from ->dynticks_nesting to ->dynticks, which is externally visible.

Frederic, given my hamhandedness on the first patch and given that you mentioned its being less time critical, I will let you forward port patches #3 and #4. I have pushed the first two patches to -rcu, branch rcu/dyntick. I will be testing over the evening.

Sure. Also #3 and #4 are not used upstream, so I should probably rather carry these in my tree once I do a rebase against yours.

#15 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 44 lines · Frederic Weisbecker
Quoted 43 lines · Paul E. McKenney
Quoted 7 lines · Josh Triplett
Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

I am a fan, also. ;-)

[ . . . ]

Quoted 13 lines
Quoted 13 lines
kernel/rcutree.c +9 -0
@@ -503,6 +515,18 @@ void rcu_user_exit(void)
 	__rcu_idle_exit();
 }
 
+void rcu_user_exit_irq(void)
+{
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
+	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
Quoted 8 lines

kernel/rcutree.c void rcu_user_enter(void) · line 416

Quoted 3 lines
kernel/rcutree.c +3 -0
+	local_irq_restore(flags);
+}
+

Any chance that either of these two needs a memory barrier of some kind, to prevent leakage of operations from between them? Or can you count on no RCU-protected operations occurring during (or leaking into) the extended quiescent state?

There is no need for a memory barrier on rdtp->dynticks_nesting because it is used (aside from state dumping) only by the local CPU. In contrast, changes to ->dynticks are visible to other CPUs, hence the memory barriers around changes to ->dynticks.

Information flows within the CPU from ->dynticks_nesting to ->dynticks, which is externally visible.

Quoted 7 lines
Quoted 4 lines

Frederic, given my hamhandedness on the first patch and given that you mentioned its being less time critical, I will let you forward port patches #3 and #4. I have pushed the first two patches to -rcu, branch rcu/dyntick. I will be testing over the evening.

Sure. Also #3 and #4 are not used upstream, so I should probably rather carry these in my tree once I do a rebase against yours.

Works for me! I am hoping that my dyntick-idle work is near an end. For this round, anyway. (Fifth or sixth rework!)

Thanx, Paul

#16 lore raw

Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

In reply to Josh Triplett
Quoted 7 lines · Josh Triplett
Quoted 4 lines · Frederic Weisbecker

A CPU running in adaptive tickless mode wants to enter into RCU extended quiescent state while running in userspace. This way we can shut down the tick that is usually needed on each CPU for the needs of RCU.

Very awesome. I've wanted to see this change for a long time. Thanks!

:-)

Quoted 22 lines
Quoted 22 lines

Typically, RCU enters the extended quiescent state when we resume to userspace through a syscall or exception exit, this is done using rcu_user_enter(). Then RCU exit this state by calling rcu_user_exit() from syscall or exception entry.

However there are two other points where we may want to enter or exit this state. Some remote CPU may require a tickless CPU to restart its tick for any reason and send it an IPI for this purpose. As we restart the tick, we don't want to resume from the IPI in RCU extended quiescent state anymore. Similarly we may stop the tick from an interrupt in userspace and we need to be able to enter RCU extended quiescent state when we resume from this interrupt to userspace.

To these ends, we provide two new APIs:

- rcu_user_enter_irq(). This must be called from a non-nesting interrupt betwenn rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll run into RCU extended quiescent state.

Quoted 8 lines
Quoted 5 lines

- rcu_user_exit_irq(). This must be called from a non-nesting interrupt, interrupting an RCU extended quiescent state, and between rcu_irq_enter() and rcu_irq_exit(). After the irq calls rcu_irq_exit(), we'll prevent from resuming the RCU extended quiescent.

It would help to see the corresponding patches making use of this new API.

Right, so I plan to use it in my nohz cpuset patchset that can be found at:

git://github.com/fweisbec/linux-dynticks.git
nohz/cpuset-v1

I haven't yet integrated these patches to this tree. I first need to do a big rebase against all the changes made against dynticks API in -rcu.

I'll do that soon.

Reviewed-by on the v1 series
#17 lore raw
In reply to Frederic Weisbecker
Quoted 11 lines · Frederic Weisbecker

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Quoted 7 lines

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

For the whole series:

#18 lore raw
Quoted 20 lines · Josh Triplett
Quoted 11 lines · Frederic Weisbecker

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Quoted 7 lines

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 3 lines

For the whole series:

Thank you, Josh!

Does that cover the conflict-resolved versions of the first two?

o https://lkml.org/lkml/2011/11/28/626
o https://lkml.org/lkml/2011/11/28/624

Thanx, Paul

#19 lore raw
Quoted 23 lines · Paul E. McKenney
Quoted 22 lines · Josh Triplett
Quoted 11 lines · Frederic Weisbecker

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Quoted 7 lines

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

For the whole series:

Quoted 8 lines
Quoted 1 line

Thank you, Josh!

Does that cover the conflict-resolved versions of the first two?

o https://lkml.org/lkml/2011/11/28/626
o https://lkml.org/lkml/2011/11/28/624

Yes, for the ones with Frederic's further eagle-eyed fix.

- Josh

#20 lore raw
Quoted 26 lines · Josh Triplett
Quoted 25 lines · Paul E. McKenney
Quoted 23 lines · Josh Triplett
Quoted 11 lines · Frederic Weisbecker

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Quoted 7 lines

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

For the whole series:

Quoted 8 lines
Quoted 6 lines

Thank you, Josh!

Does that cover the conflict-resolved versions of the first two?

o https://lkml.org/lkml/2011/11/28/626
o https://lkml.org/lkml/2011/11/28/624

Yes, for the ones with Frederic's further eagle-eyed fix.

Right, https://lkml.org/lkml/2011/11/28/626 above rather than my erroneous https://lkml.org/lkml/2011/11/28/621.

Though I thought it was falcon-eyed rather than eagle-eyed. ;-)

Thanx, Paul

#21 lore raw
Quoted 34 lines · Paul E. McKenney
Quoted 33 lines · Josh Triplett
Quoted 31 lines · Paul E. McKenney
Quoted 20 lines · Josh Triplett
Quoted 11 lines · Frederic Weisbecker

Hi Paul,

This is an attempt to make the current RCU dynticks API working with the nohz cpusets.

I believe the two first patches could be pushed in your trees. Patches 3 and 4 are rather something I plan to apply in mine, given they are not needed upstream yet.

Waiting for your comments.

Quoted 7 lines

Thanks.

Frederic Weisbecker (4):
rcu: Don't check irq nesting from rcu idle entry/exit
rcu: Irq nesting is always 0 on rcu_enter_idle_common
rcu: New rcu_user_enter() and rcu_user_exit() APIs
rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs

Quoted 3 lines

For the whole series:

Thank you, Josh!

Does that cover the conflict-resolved versions of the first two?

o https://lkml.org/lkml/2011/11/28/626
o https://lkml.org/lkml/2011/11/28/624

Quoted 6 lines
Quoted 1 line

Yes, for the ones with Frederic's further eagle-eyed fix.

Right, https://lkml.org/lkml/2011/11/28/626 above rather than my erroneous https://lkml.org/lkml/2011/11/28/621.

Though I thought it was falcon-eyed rather than eagle-eyed. ;-)

Peregrine falcon-eyed more precisely. Then I can stoop over 300 km/h right to the bug!