public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()
@ 2016-07-09  7:54 Xunlei Pang
  2016-07-09  8:12 ` Konstantin Khlebnikov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xunlei Pang @ 2016-07-09  7:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Konstantin Khlebnikov, Xunlei Pang

Should update "cfs_rq->throttled_clock_task" other than pcfs_rq's.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4088eed..039de34 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4269,7 +4269,7 @@ static void sync_throttle(struct task_group *tg, int cpu)
 	pcfs_rq = tg->parent->cfs_rq[cpu];
 
 	cfs_rq->throttle_count = pcfs_rq->throttle_count;
-	pcfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
+	cfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
 }
 
 /* conditionally throttle active cfs_rq's from put_prev_entity() */
-- 
1.8.3.1

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

* Re: [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()
  2016-07-09  7:54 [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle() Xunlei Pang
@ 2016-07-09  8:12 ` Konstantin Khlebnikov
  2016-07-12 15:26 ` Peter Zijlstra
  2016-08-10 18:00 ` [tip:sched/core] sched/fair: Fix typo " tip-bot for Xunlei Pang
  2 siblings, 0 replies; 4+ messages in thread
From: Konstantin Khlebnikov @ 2016-07-09  8:12 UTC (permalink / raw)
  To: Xunlei Pang
  Cc: Linux Kernel Mailing List, Peter Zijlstra, Ingo Molnar,
	Konstantin Khlebnikov

On Sat, Jul 9, 2016 at 10:54 AM, Xunlei Pang <xlpang@redhat.com> wrote:
> Should update "cfs_rq->throttled_clock_task" other than pcfs_rq's.
>
> Signed-off-by: Xunlei Pang <xlpang@redhat.com>

Ack

> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 4088eed..039de34 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4269,7 +4269,7 @@ static void sync_throttle(struct task_group *tg, int cpu)
>         pcfs_rq = tg->parent->cfs_rq[cpu];
>
>         cfs_rq->throttle_count = pcfs_rq->throttle_count;
> -       pcfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
> +       cfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
>  }
>
>  /* conditionally throttle active cfs_rq's from put_prev_entity() */
> --
> 1.8.3.1
>

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

* Re: [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()
  2016-07-09  7:54 [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle() Xunlei Pang
  2016-07-09  8:12 ` Konstantin Khlebnikov
@ 2016-07-12 15:26 ` Peter Zijlstra
  2016-08-10 18:00 ` [tip:sched/core] sched/fair: Fix typo " tip-bot for Xunlei Pang
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2016-07-12 15:26 UTC (permalink / raw)
  To: Xunlei Pang; +Cc: linux-kernel, Ingo Molnar, Konstantin Khlebnikov

On Sat, Jul 09, 2016 at 03:54:22PM +0800, Xunlei Pang wrote:
> +++ b/kernel/sched/fair.c
> @@ -4269,7 +4269,7 @@ static void sync_throttle(struct task_group *tg, int cpu)
>  	pcfs_rq = tg->parent->cfs_rq[cpu];
>  
>  	cfs_rq->throttle_count = pcfs_rq->throttle_count;
> -	pcfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
> +	cfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));

Ah indeed, thanks!

>  }
>  
>  /* conditionally throttle active cfs_rq's from put_prev_entity() */
> -- 
> 1.8.3.1
> 

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

* [tip:sched/core] sched/fair: Fix typo in sync_throttle()
  2016-07-09  7:54 [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle() Xunlei Pang
  2016-07-09  8:12 ` Konstantin Khlebnikov
  2016-07-12 15:26 ` Peter Zijlstra
@ 2016-08-10 18:00 ` tip-bot for Xunlei Pang
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Xunlei Pang @ 2016-08-10 18:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: torvalds, tglx, khlebnikov, linux-kernel, hpa, mingo, xlpang,
	peterz

Commit-ID:  b8922125e4790fa237a8a4204562ecf457ef54bb
Gitweb:     http://git.kernel.org/tip/b8922125e4790fa237a8a4204562ecf457ef54bb
Author:     Xunlei Pang <xlpang@redhat.com>
AuthorDate: Sat, 9 Jul 2016 15:54:22 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 13:32:55 +0200

sched/fair: Fix typo in sync_throttle()

We should update cfs_rq->throttled_clock_task, not
pcfs_rq->throttle_clock_task.

The effects of this bug was probably occasionally erratic
group scheduling, particularly in cgroups-intense workloads.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
[ Added changelog. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 55e16d30bd99 ("sched/fair: Rework throttle_count sync")
Link: http://lkml.kernel.org/r/1468050862-18864-1-git-send-email-xlpang@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4088eed..039de34 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4269,7 +4269,7 @@ static void sync_throttle(struct task_group *tg, int cpu)
 	pcfs_rq = tg->parent->cfs_rq[cpu];
 
 	cfs_rq->throttle_count = pcfs_rq->throttle_count;
-	pcfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
+	cfs_rq->throttled_clock_task = rq_clock_task(cpu_rq(cpu));
 }
 
 /* conditionally throttle active cfs_rq's from put_prev_entity() */

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

end of thread, other threads:[~2016-08-10 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-09  7:54 [PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle() Xunlei Pang
2016-07-09  8:12 ` Konstantin Khlebnikov
2016-07-12 15:26 ` Peter Zijlstra
2016-08-10 18:00 ` [tip:sched/core] sched/fair: Fix typo " tip-bot for Xunlei Pang

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