lkml.org 
[lkml]   [2013]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 17/22] sched: packing small tasks in wake/exec balancing
    On 01/14/2013 03:13 PM, Namhyung Kim wrote:
    > On Fri, 11 Jan 2013 11:47:03 +0800, Alex Shi wrote:
    >> On 01/11/2013 01:17 AM, Morten Rasmussen wrote:
    >>> On Sat, Jan 05, 2013 at 08:37:46AM +0000, Alex Shi wrote:
    >>>> If the wake/exec task is small enough, utils < 12.5%, it will
    >>>> has the chance to be packed into a cpu which is busy but still has space to
    >>>> handle it.
    >>>>
    >>>> Signed-off-by: Alex Shi <alex.shi@intel.com>
    >>>> ---
    > [snip]
    >>> I may be missing something, but could the expression be something like
    >>> the below instead?
    >>>
    >>> Create a putil < 12.5% check before the loop. There is no reason to
    >>> recheck it every iteration. Then:
    >
    > Agreed. Also suggest that the checking local cpu can also be moved
    > before the loop so that it can be used without going through the loop if
    > it's vacant enough.

    Yes, thanks for suggestion!
    >
    >>>
    >>> vacancy = FULL_UTIL - (rq->util + putil)
    >>>
    >>> should be enough?
    >>>
    >>>> +
    >>>> + /* bias toward local cpu */
    >>>> + if (vacancy > 0 && (i == this_cpu))
    >>>> + return i;
    >>>> +
    >>>> + if (vacancy > 0 && vacancy < min_vacancy) {
    >>>> + min_vacancy = vacancy;
    >>>> + idlest = i;
    >>>
    >>> "idlest" may be a bit misleading here as you actually select busiest cpu
    >>> that have enough spare capacity to take the task.
    >>
    >> Um, change to leader_cpu?
    >
    > vacantest? ;-)

    hard to the ward in google. are you sure it is better than leader_cpu? :)
    >
    > Thanks,
    > Namhyung
    >


    --
    Thanks Alex


    \
     
     \ /
      Last update: 2013-01-16 08:01    [W:4.442 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site