[lkml]   [2005]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch] latency tracer, 2.6.15-rc7

On Fri, 30 Dec 2005, Lee Revell wrote:
> No there are no large jumps, it really seems that this was the network
> code causing an RCU callback to drop ~2K routes at once. Specifically
> RCU invokes dst_rcu_free 2085 times in a single batch
> (call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free) is only called from
> rt_free() and rt_drop()).

Ok. This is likely something that was hidden by the RCU batch size thing,
but that in turn was effectively turned off because it caused
out-of-memory situations where a small batch size would cause the RCU
queues to grow without bounds (noticed when we started freeing the
dentries from RCU)..

We fixed that for "regular" RCU callbacks by noticing when the RCU queue
got long, and encouraging a RCU event when that happened. However, that
doesn't happen for the "call_rcu_bh()" case, so I'm not surprised that the
network queues can grow fairly long.

I've added Eric Dumazet, Dipankar and Paul to the Cc: list, and appended a
totally untested (and probably horribly buggy) possible patch as a
starting point for discussion. It just sets "need_resched()" in the hope
that we'll go through an RCU idle point and go the RCU callbacks. Whether
it helps your case or not, I have no clue.

diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 48d3bce..b107562 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -149,11 +149,10 @@ void fastcall call_rcu_bh(struct rcu_hea
*rdp->nxttail = head;
rdp->nxttail = &head->next;
- * Should we directly call rcu_do_batch() here ?
- * if (unlikely(rdp->count > 10000))
- * rcu_do_batch(rdp);
- */
+ if (unlikely(++rdp->count > 100))
+ set_need_resched();

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2009-11-18 23:46    [W:0.084 / U:1.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site