[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F9349A.3090605@redhat.com>
Date: Wed, 31 Jul 2013 12:00:26 -0400
From: Rik van Riel <riel@...hat.com>
To: Jason Low <jason.low2@...com>
CC: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
KML <linux-kernel@...r.kernel.org>,
Mike Galbraith <efault@....de>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Turner <pjt@...gle.com>, Alex Shi <alex.shi@...el.com>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Namhyung Kim <namhyung@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Mel Gorman <mgorman@...e.de>, aswin@...com,
scott.norton@...com, chegu_vinod@...com,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH] sched: Reduce overestimating avg_idle
On 07/31/2013 05:37 AM, Jason Low wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index e8b3350..62b484b 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1341,12 +1341,12 @@ ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
>
> if (rq->idle_stamp) {
> u64 delta = rq->clock - rq->idle_stamp;
> - u64 max = 2*sysctl_sched_migration_cost;
> + u64 max = (sysctl_sched_migration_cost * 3) / 2;
>
> - if (delta > max)
> + update_avg(&rq->avg_idle, delta);
> +
> + if (rq->avg_idle > max)
> rq->avg_idle = max;
> - else
> - update_avg(&rq->avg_idle, delta);
> rq->idle_stamp = 0;
> }
I wonder if we could get even more conservative values
of avg_idle by clamping delta to max, before calling
update_avg...
Or rather, I wonder if that would matter enough to make
a difference, and in what direction that difference would
be.
In other words:
if (rq->idle_stamp) {
u64 delta = rq->clock - rq->idle_stamp;
u64 max = (sysctl_sched_migration_cost * 3) / 2;
if (delta > max)
delta = max;
update_avg(&rq->avg_idle, delta);
rq->idle_stamp = 0;
}
--
All rights reversed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists