LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: viresh kumar <viresh.kumar@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org,
	Steven Miao <realmz6@gmail.com>,
	shashim@codeaurora.org
Subject: Re: [PATCH 1/2] timer: Avoid waking up an idle-core by migrate running timer
Date: Tue, 21 Apr 2015 23:32:23 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1504212324480.13914@nanos> (raw)
In-Reply-To: <5530C086.2020700@linaro.org>

On Fri, 17 Apr 2015, viresh kumar wrote:
> Does this look any better ?

Yes, but:
 
> 1.) Should the above list_empty(migration_list) block be added out of the
> 
> 	while (time_after_eq(jiffies, base->timer_jiffies))
> 
>     block ? So that we check it only once per timer interrupt.

That's what I suggested.
 
>     Also ->running_timer is set to the last serviced timer and a
>     del_timer_sync() might be waiting to remove it. But we continue with
>     the migration list first, without clearing it first. Not sure if this
>     is important at all..

Of course it is and doing it outside of the loop solves that issue.
 
> 2.) By the time we finish serving all pending timers, local CPU might not be
>     idle anymore OR the target CPU may become idle.

That's another good reason to move that migration list outside of the
while loop.
 
> 2.) It might be better to update preferred_target every time we choose a
> difference base. This may help us avoid calling get_nohz_timer_target()
> in the second if block above.

Yuck no. You can do that in that migration code and not add more
pointless crap to the normal case.

Are you realizing that __mod_timer() is a massive hotpath for network
heavy workloads?

This stuff needs to be debloated and not mindlessly packed with more
corner case features.

Thanks,

	tglx

  parent reply	other threads:[~2015-04-21 21:32 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 [this message]
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
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.1504212324480.13914@nanos \
    --to=tglx@linutronix.de \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=realmz6@gmail.com \
    --cc=shashim@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    --subject='Re: [PATCH 1/2] timer: Avoid waking up an idle-core by migrate running timer' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).