public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/rcutree.c: deem to be lazy if there are no callbacks.
@ 2013-08-20  3:50 Chen Gang
  2013-08-20  3:51 ` Chen Gang
  2013-08-20  4:10 ` Paul E. McKenney
  0 siblings, 2 replies; 17+ messages in thread
From: Chen Gang @ 2013-08-20  3:50 UTC (permalink / raw)
  To: dipankar, Paul McKenney; +Cc: linux-kernel@vger.kernel.org

According to the comment above rcu_cpu_has_callbacks(): "If there are
no callbacks, all of them are deemed to be lazy".

So when both 'hc' and 'al' are false, '*all_lazy' should be true, not
false.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 kernel/rcutree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5b53a89..9ee9565 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -2725,7 +2725,7 @@ static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy)
 			hc = true;
 	}
 	if (all_lazy)
-		*all_lazy = al;
+		*all_lazy = !hc ? true : al;
 	return hc;
 }
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-09-04  2:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20  3:50 [PATCH] kernel/rcutree.c: deem to be lazy if there are no callbacks Chen Gang
2013-08-20  3:51 ` Chen Gang
2013-08-20  4:18   ` Paul E. McKenney
2013-08-20  4:43     ` Chen Gang
2013-08-20  4:45       ` Chen Gang
2013-08-21  5:59         ` Chen Gang
2013-08-21 14:23           ` Paul E. McKenney
2013-08-22  3:01             ` Chen Gang
2013-08-25 19:18               ` Paul E. McKenney
2013-08-26  2:21                 ` Chen Gang F T
2013-09-03  5:41                   ` Chen Gang
2013-09-03 17:59                     ` Paul E. McKenney
2013-09-04  1:57                       ` Chen Gang
2013-09-03 19:36                   ` Paul E. McKenney
2013-09-04  2:41                     ` Chen Gang F T
2013-08-20  4:10 ` Paul E. McKenney
2013-08-20  4:30   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox