mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 4/4] sched: Revert commit 4c6c4e38c4e9
@ 2014-03-14 22:15 Kirill Tkhai
  2014-03-19 10:59 ` Preeti Murthy
  2014-04-18 13:07 ` [tip:sched/core] sched: Revert commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in pick_next_task()") tip-bot for Kirill Tkhai
  0 siblings, 2 replies; 3+ messages in thread
From: Kirill Tkhai @ 2014-03-14 22:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Zijlstra, Ingo Molnar

This reverts commit 4c6c4e38c4e9 [sched/core: Fix endless loop in
pick_next_task()], which is not necessary after [sched/rt: Substract number
of tasks of throttled queues from rq->nr_running]

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c  |    4 +---
 kernel/sched/rt.c    |   10 ++++++++++
 kernel/sched/sched.h |   12 ------------
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7e9bd0b..0d39ef7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6726,9 +6726,7 @@ static int idle_balance(struct rq *this_rq)
 
 out:
 	/* Is there a task of a high priority class? */
-	if (this_rq->nr_running != this_rq->cfs.h_nr_running &&
-	    (this_rq->dl.dl_nr_running ||
-	     (this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt))))
+	if (this_rq->nr_running != this_rq->cfs.h_nr_running)
 		pulled_task = -1;
 
 	if (pulled_task) {
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index c961350..ec0933e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -493,6 +493,11 @@ static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
 		dequeue_rt_entity(rt_se);
 }
 
+static inline int rt_rq_throttled(struct rt_rq *rt_rq)
+{
+	return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
+}
+
 static int rt_se_boosted(struct sched_rt_entity *rt_se)
 {
 	struct rt_rq *rt_rq = group_rt_rq(rt_se);
@@ -569,6 +574,11 @@ static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
 	dequeue_top_rt_rq(rt_rq);
 }
 
+static inline int rt_rq_throttled(struct rt_rq *rt_rq)
+{
+	return rt_rq->rt_throttled;
+}
+
 static inline const struct cpumask *sched_rt_period_mask(void)
 {
 	return cpu_online_mask;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 8327b4e..e8493b4 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -425,18 +425,6 @@ struct rt_rq {
 #endif
 };
 
-#ifdef CONFIG_RT_GROUP_SCHED
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-	return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
-}
-#else
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-	return rt_rq->rt_throttled;
-}
-#endif
-
 /* Deadline class' related fields in a runqueue */
 struct dl_rq {
 	/* runqueue is an rbtree, ordered by deadline */





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/4] sched: Revert commit 4c6c4e38c4e9
  2014-03-14 22:15 [PATCH 4/4] sched: Revert commit 4c6c4e38c4e9 Kirill Tkhai
@ 2014-03-19 10:59 ` Preeti Murthy
  2014-04-18 13:07 ` [tip:sched/core] sched: Revert commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in pick_next_task()") tip-bot for Kirill Tkhai
  1 sibling, 0 replies; 3+ messages in thread
From: Preeti Murthy @ 2014-03-19 10:59 UTC (permalink / raw)
  To: Kirill Tkhai; +Cc: LKML, Peter Zijlstra, Ingo Molnar, Preeti U Murthy

On Sat, Mar 15, 2014 at 3:45 AM, Kirill Tkhai <tkhai@yandex.ru> wrote:
> This reverts commit 4c6c4e38c4e9 [sched/core: Fix endless loop in
> pick_next_task()], which is not necessary after [sched/rt: Substract number
> of tasks of throttled queues from rq->nr_running]

Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
>
> Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: Ingo Molnar <mingo@kernel.org>
> ---
>  kernel/sched/fair.c  |    4 +---
>  kernel/sched/rt.c    |   10 ++++++++++
>  kernel/sched/sched.h |   12 ------------
>  3 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7e9bd0b..0d39ef7 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6726,9 +6726,7 @@ static int idle_balance(struct rq *this_rq)
>
>  out:
>         /* Is there a task of a high priority class? */
> -       if (this_rq->nr_running != this_rq->cfs.h_nr_running &&
> -           (this_rq->dl.dl_nr_running ||
> -            (this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt))))
> +       if (this_rq->nr_running != this_rq->cfs.h_nr_running)
>                 pulled_task = -1;
>
>         if (pulled_task) {
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index c961350..ec0933e 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -493,6 +493,11 @@ static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
>                 dequeue_rt_entity(rt_se);
>  }
>
> +static inline int rt_rq_throttled(struct rt_rq *rt_rq)
> +{
> +       return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
> +}
> +
>  static int rt_se_boosted(struct sched_rt_entity *rt_se)
>  {
>         struct rt_rq *rt_rq = group_rt_rq(rt_se);
> @@ -569,6 +574,11 @@ static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
>         dequeue_top_rt_rq(rt_rq);
>  }
>
> +static inline int rt_rq_throttled(struct rt_rq *rt_rq)
> +{
> +       return rt_rq->rt_throttled;
> +}
> +
>  static inline const struct cpumask *sched_rt_period_mask(void)
>  {
>         return cpu_online_mask;
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 8327b4e..e8493b4 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -425,18 +425,6 @@ struct rt_rq {
>  #endif
>  };
>
> -#ifdef CONFIG_RT_GROUP_SCHED
> -static inline int rt_rq_throttled(struct rt_rq *rt_rq)
> -{
> -       return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
> -}
> -#else
> -static inline int rt_rq_throttled(struct rt_rq *rt_rq)
> -{
> -       return rt_rq->rt_throttled;
> -}
> -#endif
> -
>  /* Deadline class' related fields in a runqueue */
>  struct dl_rq {
>         /* runqueue is an rbtree, ordered by deadline */
>
>
>
>
> --
> 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:sched/core] sched: Revert commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in pick_next_task()")
  2014-03-14 22:15 [PATCH 4/4] sched: Revert commit 4c6c4e38c4e9 Kirill Tkhai
  2014-03-19 10:59 ` Preeti Murthy
@ 2014-04-18 13:07 ` tip-bot for Kirill Tkhai
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Kirill Tkhai @ 2014-04-18 13:07 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, preeti, peterz, tkhai, tglx

Commit-ID:  46383648b3c769fa74794ae6425ab993fc113bdb
Gitweb:     http://git.kernel.org/tip/46383648b3c769fa74794ae6425ab993fc113bdb
Author:     Kirill Tkhai <tkhai@yandex.ru>
AuthorDate: Sat, 15 Mar 2014 02:15:07 +0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 18 Apr 2014 12:07:29 +0200

sched: Revert commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in pick_next_task()")

This reverts commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in
pick_next_task()"), which is not necessary after ("sched/rt: Substract number
of tasks of throttled queues from rq->nr_running").

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
[conflict resolution with stop task checking patch]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1394835307.18748.34.camel@HP-250-G1-Notebook-PC
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c  |  5 +----
 kernel/sched/rt.c    | 10 ++++++++++
 kernel/sched/sched.h | 12 ------------
 3 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5e157f1..43232b8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6732,10 +6732,7 @@ static int idle_balance(struct rq *this_rq)
 
 out:
 	/* Is there a task of a high priority class? */
-	if (this_rq->nr_running != this_rq->cfs.h_nr_running &&
-	    ((this_rq->stop && this_rq->stop->on_rq) ||
-	     this_rq->dl.dl_nr_running ||
-	     (this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt))))
+	if (this_rq->nr_running != this_rq->cfs.h_nr_running)
 		pulled_task = -1;
 
 	if (pulled_task) {
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 2add019..7795e29 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -493,6 +493,11 @@ static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
 		dequeue_rt_entity(rt_se);
 }
 
+static inline int rt_rq_throttled(struct rt_rq *rt_rq)
+{
+	return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
+}
+
 static int rt_se_boosted(struct sched_rt_entity *rt_se)
 {
 	struct rt_rq *rt_rq = group_rt_rq(rt_se);
@@ -569,6 +574,11 @@ static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
 	dequeue_top_rt_rq(rt_rq);
 }
 
+static inline int rt_rq_throttled(struct rt_rq *rt_rq)
+{
+	return rt_rq->rt_throttled;
+}
+
 static inline const struct cpumask *sched_rt_period_mask(void)
 {
 	return cpu_online_mask;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index c8d9ee4..b2cbe81 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -425,18 +425,6 @@ struct rt_rq {
 #endif
 };
 
-#ifdef CONFIG_RT_GROUP_SCHED
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-	return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
-}
-#else
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-	return rt_rq->rt_throttled;
-}
-#endif
-
 /* Deadline class' related fields in a runqueue */
 struct dl_rq {
 	/* runqueue is an rbtree, ordered by deadline */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-18 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 22:15 [PATCH 4/4] sched: Revert commit 4c6c4e38c4e9 Kirill Tkhai
2014-03-19 10:59 ` Preeti Murthy
2014-04-18 13:07 ` [tip:sched/core] sched: Revert commit 4c6c4e38c4e9 ("sched/core: Fix endless loop in pick_next_task()") tip-bot for Kirill Tkhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome