[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM4v1pPPOE9xrH3AKc6sHAThPq43Ws_L_KuicRa5Ktr5nMBmtQ@mail.gmail.com>
Date: Mon, 10 Feb 2014 15:34:29 +0530
From: Preeti Murthy <preeti.lkml@...il.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org,
alex.shi@...aro.org, LKML <linux-kernel@...r.kernel.org>,
Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Subject: Re: [PATCH V2 3/3] sched: Move idle_stamp up to the core
Hi Daniel,
On Fri, Feb 7, 2014 at 4:40 AM, Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
> The idle_balance modifies the idle_stamp field of the rq, making this
> information to be shared across core.c and fair.c. As we can know if the
> cpu is going to idle or not with the previous patch, let's encapsulate the
> idle_stamp information in core.c by moving it up to the caller. The
> idle_balance function returns true in case a balancing occured and the cpu
> won't be idle, false if no balance happened and the cpu is going idle.
>
> Cc: mingo@...nel.org
> Cc: alex.shi@...aro.org
> Cc: peterz@...radead.org
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> ---
> kernel/sched/core.c | 13 +++++++++++--
> kernel/sched/fair.c | 14 ++++++--------
> kernel/sched/sched.h | 8 +-------
> 3 files changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 16b97dd..428ee4c 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -2704,8 +2704,17 @@ need_resched:
>
> pre_schedule(rq, prev);
>
> - if (unlikely(!rq->nr_running))
> - idle_balance(rq);
> +#ifdef CONFIG_SMP
> + if (unlikely(!rq->nr_running)) {
> + /*
> + * We must set idle_stamp _before_ calling idle_balance(), such
> + * that we measure the duration of idle_balance() as idle time.
Should not this be "such that we *do not* measure the duration of idle_balance()
as idle time?"
Thanks
Regards
Preeti U Murthy
--
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