]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix synchronize_rcu(): high latency on idle system
authorBenjamin LaHaise <bcrl@kvack.org>
Wed, 30 Jan 2008 12:33:13 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:33:13 +0000 (13:33 +0100)
an otherwise idle system takes about 3 ticks per network
interface in unregister_netdev() due to multiple calls to synchronize_rcu(),
which adds up to quite a few seconds for tearing down thousands of
interfaces.  By flushing pending rcu callbacks in the idle loop, the system
makes progress hundreds of times faster.  If this is indeed a sane thing to,
it probably needs to be done for other architectures than x86.  And yes, the
network stack shouldn't call synchronize_rcu() quite so much, but fixing that
is a little more involved.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/process_32.c

index 7a61b54649de4e183d2bc9e5e059d51b559bed26..69a69c3f43bb4940c6fa9485b0015debb68f432a 100644 (file)
@@ -198,6 +198,9 @@ void cpu_idle(void)
                        rmb();
                        idle = pm_idle;
 
+                       if (rcu_pending(cpu))
+                               rcu_check_callbacks(cpu, 0);
+
                        if (!idle)
                                idle = default_idle;