lkml.org 
[lkml]   [2014]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] sched/fair: Care divide error in update_task_scan_period()
    On 10/08/2014 02:43 AM, Yasuaki Ishimatsu wrote:

    > The divide error is rare case because the trigger is node offline.
    > By this patch, when both of private and shared are set to 0, diff
    > is just set to 0, not calculating the division.

    How about a simple

    if (private + shared) == 0)
    return;

    higher up in the function, to avoid adding an extra
    layer of indentation and confusion to the main part
    of the function?


    \
     
     \ /
      Last update: 2014-10-08 19:21    [W:2.894 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site