All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	viresh kumar <viresh.kumar@linaro.org>,
	Ingo Molnar <mingo@redhat.com>,
	linaro-kernel@lists.linaro.org,
	LKML <linux-kernel@vger.kernel.org>,
	Steven Miao <realmz6@gmail.com>,
	shashim@codeaurora.org, Frederic Weisbecker <fweisbec@gmail.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	cl@kernel.org
Subject: Re: [PATCH 1/2] timer: Avoid waking up an idle-core by migrate running timer
Date: Thu, 23 Apr 2015 14:45:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1504231439300.13914@nanos> (raw)
In-Reply-To: <1429772251.22254.35.camel@edumazet-glaptop2.roam.corp.google.com>

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



  reply	other threads:[~2015-04-23 12:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  6:55 [PATCH 0/2] timer: Migrate running timers Viresh Kumar
2015-03-31  6:55 ` [PATCH 1/2] timer: Avoid waking up an idle-core by migrate running timer Viresh Kumar
2015-03-31 14:53   ` Peter Zijlstra
2015-04-14 23:13   ` Thomas Gleixner
2015-04-17  8:12     ` viresh kumar
2015-04-17  8:32       ` Ingo Molnar
2015-04-21 21:32       ` Thomas Gleixner
2015-04-21 21:54         ` Eric Dumazet
2015-04-22 15:29           ` Peter Zijlstra
2015-04-22 16:02             ` Eric Dumazet
2015-04-22 18:56               ` Thomas Gleixner
2015-04-22 19:59                 ` Eric Dumazet
2015-04-22 21:56                   ` Thomas Gleixner
2015-04-23  6:57                     ` Eric Dumazet
2015-04-23 12:45                       ` Thomas Gleixner [this message]
2015-04-25 18:37                         ` Eric Dumazet
2015-05-05 13:00                           ` Thomas Gleixner
2015-05-06 16:33                             ` Eric Dumazet
2015-04-15 15:54   ` Thomas Gleixner
2015-03-31  6:55 ` [PATCH 2/2] timer: Replace base-> 'running_timer' with 'busy' Viresh Kumar
2015-03-31 15:01 ` [PATCH 0/2] timer: Migrate running timers Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1504231439300.13914@nanos \
    --to=tglx@linutronix.de \
    --cc=cl@kernel.org \
    --cc=eric.dumazet@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=realmz6@gmail.com \
    --cc=shashim@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.