linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] rcu: don't check ->donelist in __rcu_pending()
@ 2006-01-08 19:19 Oleg Nesterov
  2006-01-08 22:00 ` Paul E. McKenney
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Oleg Nesterov @ 2006-01-08 19:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dipankar Sarma, Manfred Spraul, Linus Torvalds, Paul E. McKenney,
	Andrew Morton

->donelist becomes != NULL only in rcu_process_callbacks().

rcu_process_callbacks() always calls rcu_do_batch() when
->donelist != NULL.

rcu_do_batch() schedules rcu_process_callbacks() again if
->donelist was not flushed entirely.

So ->donelist != NULL means that rcu_tasklet is either
TASKLET_STATE_SCHED or TASKLET_STATE_RUN, we don't need to
check it in __rcu_pending().

[ This patch was tested with rcutorture.ko, I don't understand
  it's output, but it says "End of test: SUCCESS". So if this
  patch incorrect blame Paul, not me! ]

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.15/kernel/rcupdate.c~2_DONE	2006-01-08 21:35:21.000000000 +0300
+++ 2.6.15/kernel/rcupdate.c	2006-01-08 21:55:45.000000000 +0300
@@ -454,10 +454,6 @@ static int __rcu_pending(struct rcu_ctrl
 	if (!rdp->curlist && rdp->nxtlist)
 		return 1;
 
-	/* This cpu has finished callbacks to invoke */
-	if (rdp->donelist)
-		return 1;
-
 	/* The rcu core waits for a quiescent state from the cpu */
 	if (rdp->quiescbatch != rcp->cur || rdp->qs_pending)
 		return 1;

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

end of thread, other threads:[~2006-01-11 18:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-08 19:19 [PATCH 2/5] rcu: don't check ->donelist in __rcu_pending() Oleg Nesterov
2006-01-08 22:00 ` Paul E. McKenney
2006-01-09  9:31 ` Srivatsa Vaddagiri
2006-01-09 14:51   ` Oleg Nesterov
2006-01-09 13:42     ` Srivatsa Vaddagiri
2006-01-09 15:33       ` Oleg Nesterov
2006-01-09 18:59 ` Paul E. McKenney
2006-01-09 20:31   ` Oleg Nesterov
2006-01-09 19:59     ` Paul E. McKenney
2006-01-10  9:58       ` Srivatsa Vaddagiri
2006-01-10 14:24         ` [PATCH] rcu: fix hotplug-cpu ->donelist leak Oleg Nesterov
2006-01-11  5:01           ` Paul E. McKenney
2006-01-11 16:28           ` Paul E. McKenney
2006-01-11 19:25             ` Oleg Nesterov
2006-01-11 18:21               ` Paul E. McKenney
2006-01-10 14:27         ` [PATCH 2/5] rcu: don't check ->donelist in __rcu_pending() Oleg Nesterov
2006-01-10 18:13 ` Dipankar Sarma

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).