[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1504231439300.13914@nanos>
Date: Thu, 23 Apr 2015 14:45:56 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: Peter Zijlstra <peterz@...radead.org>,
viresh kumar <viresh.kumar@...aro.org>,
Ingo Molnar <mingo@...hat.com>, linaro-kernel@...ts.linaro.org,
LKML <linux-kernel@...r.kernel.org>,
Steven Miao <realmz6@...il.com>, shashim@...eaurora.org,
Frederic Weisbecker <fweisbec@...il.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, cl@...nel.org
Subject: Re: [PATCH 1/2] timer: Avoid waking up an idle-core by migrate
running timer
On Wed, 22 Apr 2015, Eric Dumazet wrote:
> On Wed, 2015-04-22 at 23:56 +0200, Thomas Gleixner wrote:
>
> > -int get_nohz_timer_target(int pinned)
> > +int get_nohz_timer_target(void)
> > {
> > - int cpu = smp_processor_id();
> > - int i;
> > + int i, cpu = smp_processor_id();
> > struct sched_domain *sd;
> >
> > - if (pinned || !get_sysctl_timer_migration() || !idle_cpu(cpu))
> > + if (!idle_cpu(cpu))
> > return cpu;
>
> Maybe also test in_serving_softirq() ?
>
> if (in_serving_softirq() || !idle_cpu(cpu))
> return cpu;
>
> There is a fundamental problem with networking load : Many cpus appear
> to be idle from scheduler perspective because no user/kernel task is running.
>
> CPUs servicing NIC queues can be very busy handling thousands of packets
> per second, yet have no user/kernel task running.
>
> idle_cpu() return code is : this cpu is idle. hmmmm, really ?
>
> cpus are busy, *and* have to access alien data/locks to activate timers
> that hardly fire anyway.
>
> When idle_cpu() finally gives the right indication, it is too late :
> ksoftirqd might be running on the wrong cpu. Innocent cpus, overwhelmed
> by a sudden timer load and locked into a service loop.
>
> This cannot resist to a DOS, and even with non malicious traffic, the
> overhead is high.
You definitely have a point from the high throughput networking
perspective.
Though in a power optimizing scenario with minimal network traffic
this might be the wrong decision. We have to gather data from the
power maniacs whether this matters or not. The FULL_NO_HZ camp might
be pretty unhappy about the above.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists