Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310950 > unrolled thread

Re: [ANNOUNCE] 4.4-rc6-rt1

Started byMike Galbraith <umgwanakikbuti@gmail.com>
First post2016-01-16 14:30 +0100
Last post2016-01-16 15:10 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [ANNOUNCE] 4.4-rc6-rt1 Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-16 14:30 +0100
    Re: [ANNOUNCE] 4.4-rc6-rt1 Thomas Gleixner <tglx@linutronix.de> - 2016-01-16 14:50 +0100
      Re: [ANNOUNCE] 4.4-rc6-rt1 Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-16 15:00 +0100
        Re: [ANNOUNCE] 4.4-rc6-rt1 Thomas Gleixner <tglx@linutronix.de> - 2016-01-16 15:10 +0100
          Re: [ANNOUNCE] 4.4-rc6-rt1 Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-16 15:10 +0100

#1310950 — Re: [ANNOUNCE] 4.4-rc6-rt1

FromMike Galbraith <umgwanakikbuti@gmail.com>
Date2016-01-16 14:30 +0100
SubjectRe: [ANNOUNCE] 4.4-rc6-rt1
Message-ID<qRz5x-4RD-11@gated-at.bofh.it>
On Thu, 2016-01-14 at 17:05 +0100, Mike Galbraith wrote:

> This is virgin -rt1 modulo fixlet applied to v4.4.0, built with the
> .config from v4.4.0 that built it (modulo RT_FULL) rebuilding itself
> via make -j8.
> 
> homer:/root # vmstat 10
> procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
>  0  1      0 14742988 179832 680792    0    0   634    25  326 1196  2  1 89  8  0
>  8  0      0 14476084 179848 701632    0    0   814   525 2421 12314 11  1 87  1  0
>  8  0      0 14483232 179864 712656    0    0   165  1628 2404 12320 11  1 87  1  0
>  8  0      0 14493336 180008 727836    0    0   141   762 2328 11306 11  1 87  0  0
>  8  0      0 14456436 180024 738356    0    0   159  1478 2336 11939 11  1 87  0  0
> 
> Way too idle, taking forever.

It now being the weekend...

sched: Disable default set_cpus_allowed() method during update_migrate_disable().

update_migrate_disable() calls class::set_cpus_allowed(), when that method
is set_cpus_allowed_common(), writing to ->cpus_allowed defeats the intent
of migrate_disable(), permanently disabling migration instead.

Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
---
 kernel/sched/core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1205,6 +1205,8 @@ static int migration_cpu_stop(void *data
  */
 void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
 {
+	if (__migrate_disabled(p))
+		return;
 	cpumask_copy(&p->cpus_allowed, new_mask);
 	p->nr_cpus_allowed = cpumask_weight(new_mask);
 }

[toc] | [next] | [standalone]


#1310953

FromThomas Gleixner <tglx@linutronix.de>
Date2016-01-16 14:50 +0100
Message-ID<qRzoS-50b-5@gated-at.bofh.it>
In reply to#1310950
On Sat, 16 Jan 2016, Mike Galbraith wrote:
> On Thu, 2016-01-14 at 17:05 +0100, Mike Galbraith wrote:
> 
> > This is virgin -rt1 modulo fixlet applied to v4.4.0, built with the
> > .config from v4.4.0 that built it (modulo RT_FULL) rebuilding itself
> > via make -j8.
> > 
> > homer:/root # vmstat 10
> > procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
> >  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
> >  0  1      0 14742988 179832 680792    0    0   634    25  326 1196  2  1 89  8  0
> >  8  0      0 14476084 179848 701632    0    0   814   525 2421 12314 11  1 87  1  0
> >  8  0      0 14483232 179864 712656    0    0   165  1628 2404 12320 11  1 87  1  0
> >  8  0      0 14493336 180008 727836    0    0   141   762 2328 11306 11  1 87  0  0
> >  8  0      0 14456436 180024 738356    0    0   159  1478 2336 11939 11  1 87  0  0
> > 
> > Way too idle, taking forever.
> 
> It now being the weekend...
> 
> sched: Disable default set_cpus_allowed() method during update_migrate_disable().
> 
> update_migrate_disable() calls class::set_cpus_allowed(), when that method
> is set_cpus_allowed_common(), writing to ->cpus_allowed defeats the intent
> of migrate_disable(), permanently disabling migration instead.

Ha, you found it as well :)

> Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
> ---
>  kernel/sched/core.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1205,6 +1205,8 @@ static int migration_cpu_stop(void *data
>   */
>  void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
>  {
> +	if (__migrate_disabled(p))
> +		return;
>  	cpumask_copy(&p->cpus_allowed, new_mask);
>  	p->nr_cpus_allowed = cpumask_weight(new_mask);
>  }
> 

[toc] | [prev] | [next] | [standalone]


#1310954

FromMike Galbraith <umgwanakikbuti@gmail.com>
Date2016-01-16 15:00 +0100
Message-ID<qRzyy-53T-5@gated-at.bofh.it>
In reply to#1310953
On Sat, 2016-01-16 at 14:43 +0100, Thomas Gleixner wrote:

> Ha, you found it as well :)

Yeah, with time to actually look, I rather quickly had one of those
"well _duh_" moments :)

	-Mike

[toc] | [prev] | [next] | [standalone]


#1310956

FromThomas Gleixner <tglx@linutronix.de>
Date2016-01-16 15:10 +0100
Message-ID<qRzIe-5mB-7@gated-at.bofh.it>
In reply to#1310954
On Sat, 16 Jan 2016, Mike Galbraith wrote:
> On Sat, 2016-01-16 at 14:43 +0100, Thomas Gleixner wrote:
> 
> > Ha, you found it as well :)
> 
> Yeah, with time to actually look, I rather quickly had one of those
> "well _duh_" moments :)

Actually the new way how the scheduler handles set_cpus_allowed() makes it
superflous to call that stuff at all.

All scheduler classes except deadline merily call set_cpus_allowed_common()
and deadline does not do the 'change root domain' dance either.

So we can simplify the whole business a lot.

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1310958

FromMike Galbraith <umgwanakikbuti@gmail.com>
Date2016-01-16 15:10 +0100
Message-ID<qRzIe-5mB-9@gated-at.bofh.it>
In reply to#1310956
On Sat, 2016-01-16 at 14:59 +0100, Thomas Gleixner wrote:

> All scheduler classes except deadline merily call set_cpus_allowed_common()
> and deadline does not do the 'change root domain' dance either.
> 
> So we can simplify the whole business a lot.

Goody.  Seeing if I could avoid mostly useless function call was next.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web