[PATCH] rcu: increment quiescent state counter in ksoftirqd()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Friday, February 27, 2009 - 9:08 am

Eric Dumazet a écrit :

Hi Paul

I found following patch helps if one cpu is looping inside ksoftirqd()

synchronize_rcu() now completes in 40 ms instead of 1800 ms.

Thank you

[PATCH] rcu: increment quiescent state counter in ksoftirqd()

If a machine is flooded by network frames, a cpu can loop 100% of its time
inside ksoftirqd() without calling schedule().
This can delay RCU grace period to insane values. 

Adding rcu_qsctr_inc() call in ksoftirqd() solves this problem.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
---
diff --git a/kernel/softirq.c b/kernel/softirq.c
index bdbe9de..9041ea7 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -626,6 +626,7 @@ static int ksoftirqd(void * __bind_cpu)
 			preempt_enable_no_resched();
 			cond_resched();
 			preempt_disable();
+			rcu_qsctr_inc((long)__bind_cpu);
 		}
 		preempt_enable();
 		set_current_state(TASK_INTERRUPTIBLE);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFT 1/4] iptables: lock free counters, Stephen Hemminger, (Tue Feb 17, 10:19 pm)
Re: [RFT 1/4] iptables: lock free counters, Patrick McHardy, (Wed Feb 18, 3:02 am)
[PATCH] iptables: lock free counters, Stephen Hemminger, (Thu Feb 19, 12:47 pm)
Re: [PATCH] iptables: lock free counters, Eric Dumazet, (Thu Feb 19, 4:46 pm)
Re: [PATCH] iptables: lock free counters, Rick Jones, (Thu Feb 19, 4:56 pm)
Re: [PATCH] iptables: lock free counters, Stephen Hemminger, (Thu Feb 19, 6:03 pm)
Re: [PATCH] iptables: lock free counters, Rick Jones, (Thu Feb 19, 6:18 pm)
Re: [PATCH] iptables: lock free counters, Patrick McHardy, (Fri Feb 20, 2:37 am)
Re: [PATCH] iptables: lock free counters, Patrick McHardy, (Fri Feb 20, 2:42 am)
[PATCH] iptables: xt_hashlimit fix, Eric Dumazet, (Fri Feb 20, 11:10 am)
Re: [PATCH] iptables: xt_hashlimit fix, Jan Engelhardt, (Fri Feb 20, 11:33 am)
Re: [PATCH] iptables: lock free counters, Rick Jones, (Fri Feb 20, 3:57 pm)
Re: [PATCH] iptables: lock free counters, Rick Jones, (Fri Feb 20, 5:35 pm)
Re: [PATCH] iptables: xt_hashlimit fix, Patrick McHardy, (Tue Feb 24, 7:31 am)
Re: [PATCH] iptables: lock free counters, Eric Dumazet, (Fri Feb 27, 7:02 am)
[PATCH] rcu: increment quiescent state counter in ksoftirqd(), Eric Dumazet, (Fri Feb 27, 9:08 am)
Re: [PATCH] iptables: xt_hashlimit fix, Jan Engelhardt, (Fri Feb 27, 6:54 pm)
Re: [PATCH] iptables: xt_hashlimit fix, Eric Dumazet, (Fri Feb 27, 11:56 pm)
Re: [PATCH] iptables: xt_hashlimit fix, Jan Engelhardt, (Sat Feb 28, 1:22 am)
Re: [PATCH] iptables: lock free counters, Patrick McHardy, (Mon Mar 2, 3:55 am)
Re: [PATCH] iptables: lock free counters, Eric Dumazet, (Mon Mar 2, 10:47 am)
Re: [PATCH] iptables: lock free counters, Patrick McHardy, (Mon Mar 2, 2:56 pm)
Re: [PATCH] iptables: lock free counters, Stephen Hemminger, (Mon Mar 2, 3:02 pm)
Re: [PATCH] iptables: lock free counters, Patrick McHardy, (Mon Mar 2, 3:07 pm)
Re: [PATCH] iptables: lock free counters, Paul E. McKenney, (Mon Mar 2, 3:17 pm)
Re: [PATCH] iptables: lock free counters, Eric Dumazet, (Mon Mar 2, 3:27 pm)