lkml.org 
[lkml]   [2013]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] sched: factor out code to should_we_balance()
From
Date
On Thu, 2013-03-28 at 16:58 +0900, Joonsoo Kim wrote:
> Now checking that this cpu is appropriate to balance is embedded into
> update_sg_lb_stats() and this checking has no direct relationship to
> this
> function.
>
> There is not enough reason to place this checking at
> update_sg_lb_stats(),
> except saving one iteration for sched_group_cpus.

Its only one iteration if there's only 2 groups, but there can be more
than 2, take any desktop Intel i7, it will have 4-8 cores, each with
HT; thus the CPU domain will have 4-8 groups.

And note that local_group is always the first group of a domain, so
we'd stop the balance at the first group and avoid touching the other
3-7, avoiding touching cachelines on 6-14 cpus.

So this short-cut does make sense.. its not pretty, granted, but
killing it doesn't seem right.



\
 
 \ /
  Last update: 2013-04-02 11:01    [W:0.128 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site