From: preeti@linux.vnet.ibm.com (Preeti U Murthy)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 4/4] sched: add per group cpu_power_orig
Date: Tue, 01 Apr 2014 16:11:51 +0530 [thread overview]
Message-ID: <533A97EF.7030900@linux.vnet.ibm.com> (raw)
In-Reply-To: <1396013246-6577-1-git-send-email-vincent.guittot@linaro.org>
Hi Vincent,
On 03/28/2014 06:57 PM, Vincent Guittot wrote:
> This new field cpu_power_orig reflects the available capacity of a CPUs unlike
> the cpu_power which reflects the current capacity that can be altered by
> frequency and rt tasks.
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Should not the subject be "add per rq cpu_power_orig"?
Regards
Preeti U Murthy
> ---
> kernel/sched/core.c | 2 +-
> kernel/sched/fair.c | 1 +
> kernel/sched/sched.h | 1 +
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 5b20b27..8513f83 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6911,7 +6911,7 @@ void __init sched_init(void)
> #ifdef CONFIG_SMP
> rq->sd = NULL;
> rq->rd = NULL;
> - rq->cpu_power = SCHED_POWER_SCALE;
> + rq->cpu_power = rq->cpu_power_orig = SCHED_POWER_SCALE;
> rq->post_schedule = 0;
> rq->active_balance = 0;
> rq->next_balance = jiffies;
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7387c05..f1e4db6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5611,6 +5611,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
>
> power >>= SCHED_POWER_SHIFT;
>
> + cpu_rq(cpu)->cpu_power_orig = power;
> sdg->sgp->power_orig = power;
>
> if (sched_feat(ARCH_POWER))
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 46c3784..2abdf5c 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -578,6 +578,7 @@ struct rq {
> struct sched_domain *sd;
>
> unsigned long cpu_power;
> + unsigned long cpu_power_orig;
>
> unsigned char idle_balance;
> /* For active balancing */
>
WARNING: multiple messages have this Message-ID (diff)
From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: peterz@infradead.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, linux@arm.linux.org.uk,
linux-arm-kernel@lists.infradead.org, Morten.Rasmussen@arm.com,
efault@gmx.de, linaro-kernel@lists.linaro.org
Subject: Re: [RFC 4/4] sched: add per group cpu_power_orig
Date: Tue, 01 Apr 2014 16:11:51 +0530 [thread overview]
Message-ID: <533A97EF.7030900@linux.vnet.ibm.com> (raw)
In-Reply-To: <1396013246-6577-1-git-send-email-vincent.guittot@linaro.org>
Hi Vincent,
On 03/28/2014 06:57 PM, Vincent Guittot wrote:
> This new field cpu_power_orig reflects the available capacity of a CPUs unlike
> the cpu_power which reflects the current capacity that can be altered by
> frequency and rt tasks.
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Should not the subject be "add per rq cpu_power_orig"?
Regards
Preeti U Murthy
> ---
> kernel/sched/core.c | 2 +-
> kernel/sched/fair.c | 1 +
> kernel/sched/sched.h | 1 +
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 5b20b27..8513f83 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6911,7 +6911,7 @@ void __init sched_init(void)
> #ifdef CONFIG_SMP
> rq->sd = NULL;
> rq->rd = NULL;
> - rq->cpu_power = SCHED_POWER_SCALE;
> + rq->cpu_power = rq->cpu_power_orig = SCHED_POWER_SCALE;
> rq->post_schedule = 0;
> rq->active_balance = 0;
> rq->next_balance = jiffies;
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7387c05..f1e4db6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5611,6 +5611,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
>
> power >>= SCHED_POWER_SHIFT;
>
> + cpu_rq(cpu)->cpu_power_orig = power;
> sdg->sgp->power_orig = power;
>
> if (sched_feat(ARCH_POWER))
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 46c3784..2abdf5c 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -578,6 +578,7 @@ struct rq {
> struct sched_domain *sd;
>
> unsigned long cpu_power;
> + unsigned long cpu_power_orig;
>
> unsigned char idle_balance;
> /* For active balancing */
>
next prev parent reply other threads:[~2014-04-01 10:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 13:27 [RFC 4/4] sched: add per group cpu_power_orig Vincent Guittot
2014-03-28 13:27 ` Vincent Guittot
2014-04-01 10:41 ` Preeti U Murthy [this message]
2014-04-01 10:41 ` Preeti U Murthy
2014-04-01 11:11 ` Vincent Guittot
2014-04-01 11:11 ` Vincent Guittot
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=533A97EF.7030900@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=linux-arm-kernel@lists.infradead.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.