Message ID | 1404144343-18720-7-git-send-email-vincent.guittot@linaro.org |
---|---|
State | New |
Headers | show |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/30/2014 12:05 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> Acked-by: Rik van Riel <riel@redhat.com> - -- All rights reversed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTvLLxAAoJEM553pKExN6DKHsIALFlj278vKIifriFbVOOYgDf RppA21YTjzYP8YE00h0INatqPeIBRn5u1ifHUzlAtGIIV8dWy5q8QKu3D5zxNPfH hTxqyX/vMYcLTJOC9yXPS+mM/wcOx1JEpNnuRtF3UZgjG+70boPuGLvlecy+mxz9 mtW6StYOxX0/WgHgbWHMYaVDCKGdn5P2ey6azD2Hrvmp6XsVat8T9+ChdmRJ0/t+ 0D7QrEo56h+YSU3l0TqoHFwT/8l8pyGGyYOi1ABeZIaY13W2SJu2Ec4cYhK6qqmN uz69QWwTPa1gOPTqpj1f8g64/ckBjwKaA7hB9GLCqqk1cuI6PK22B5QJEg/9BpE= =wa9A -----END PGP SIGNATURE----- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
On Mon, Jun 30, 2014 at 6:05 PM, Vincent Guittot <vincent.guittot@linaro.org> 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. > s/cpu_power/cpu_capacity > Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> > --- > 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 54f5722..92dd6d1 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -6964,7 +6964,7 @@ void __init sched_init(void) > #ifdef CONFIG_SMP > rq->sd = NULL; > rq->rd = NULL; > - rq->cpu_capacity = SCHED_CAPACITY_SCALE; > + rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_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 f0bba5f..7dff578 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5671,6 +5671,7 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu) > > capacity >>= SCHED_CAPACITY_SHIFT; > > + cpu_rq(cpu)->cpu_capacity_orig = capacity; > sdg->sgc->capacity_orig = capacity; > > if (sched_feat(ARCH_CAPACITY)) > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > index 2f86361..7b311de 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -568,6 +568,7 @@ struct rq { > struct sched_domain *sd; > > unsigned long cpu_capacity; > + unsigned long cpu_capacity_orig; > > unsigned char idle_balance; > /* For active balancing */ > -- > 1.9.1 > > > _______________________________________________ > linaro-kernel mailing list > linaro-kernel@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/linaro-kernel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 54f5722..92dd6d1 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6964,7 +6964,7 @@ void __init sched_init(void) #ifdef CONFIG_SMP rq->sd = NULL; rq->rd = NULL; - rq->cpu_capacity = SCHED_CAPACITY_SCALE; + rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_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 f0bba5f..7dff578 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5671,6 +5671,7 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu) capacity >>= SCHED_CAPACITY_SHIFT; + cpu_rq(cpu)->cpu_capacity_orig = capacity; sdg->sgc->capacity_orig = capacity; if (sched_feat(ARCH_CAPACITY)) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 2f86361..7b311de 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -568,6 +568,7 @@ struct rq { struct sched_domain *sd; unsigned long cpu_capacity; + unsigned long cpu_capacity_orig; unsigned char idle_balance; /* For active balancing */
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> --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 1 + kernel/sched/sched.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)