[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161219232926.GH2895@var.home>
Date:   Tue, 20 Dec 2016 00:29:26 +0100
From:   Samuel Thibault <samuel.thibault@...-lyon.org>
To:     Paul Turner <pjt@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] sched/fair: fix calc_cfs_shares fixed point arithmetics
Paul Turner, on Mon 19 Dec 2016 15:26:19 -0800, wrote:
> >> > -       if (shares < MIN_SHARES)
> >> > -               shares = MIN_SHARES;
> > ...
> >> >         return shares;
> >
> > This will only make sure that the returned shares is 2, not 2048.
> 
> This is intentional.  The MIN_SHARES you are seeing here is overloaded.
> Every "1" unit of share is "SCHED_LOAD_RESOLUTION" bits internally.
I'm not talking about the SCHED_LOAD_RESOLUTION scaling, but about the
SCHED_FIXEDPOINT_SHIFT scaling, which is what
2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels")
modified on 64bit platforms.
Samuel
Powered by blists - more mailing lists