[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] timer: Avoid waking up an idle-core by migrate running timer
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.



 \ /
  Last update: 2015-04-21 23:41    [W:0.068 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site