From: Peter Zijlstra <peterz@infradead.org>
To: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, stable@vger.kernel.org
Subject: Re: [PATCH] sched/fair: fix contribution calculation
Date: Wed, 5 Jul 2017 13:59:15 +0200 [thread overview]
Message-ID: <20170705115915.GE4941@worktop> (raw)
In-Reply-To: <1499244390-4406-1-git-send-email-opensource.ganesh@gmail.com>
On Wed, Jul 05, 2017 at 04:46:30PM +0800, Ganesh Mahendran wrote:
> Function __compute_runnable_contrib() is to calculate:
> \Sum 1024*y^n {for (1..n_period)}
> But LOAD_AVG_MAX returns sum of 1024*y^n (0..n_period).
> So we need to subtract 1024*y^0.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 90e26b1..777ad49 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2508,7 +2508,7 @@ static u32 __compute_runnable_contrib(u64 n)
> if (likely(n <= LOAD_AVG_PERIOD))
> return runnable_avg_yN_sum[n];
> else if (unlikely(n >= LOAD_AVG_MAX_N))
> - return LOAD_AVG_MAX;
> + return LOAD_AVG_MAX - 1024;
>
> /* Compute \Sum k^n combining precomputed values for k^i, \Sum k^j */
> do {
This code no longer exists...
next prev parent reply other threads:[~2017-07-05 11:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 8:46 [PATCH] sched/fair: fix contribution calculation Ganesh Mahendran
2017-07-05 11:59 ` Peter Zijlstra [this message]
2017-07-06 1:39 ` Ganesh Mahendran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170705115915.GE4941@worktop \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=opensource.ganesh@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.