Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Andy Lutomirski
On Thu, Jan 26, 2017 at 6:54 AM, Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > >> index c56fb57f2991..7eb2f3041fde 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, >>

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Andy Lutomirski
On Thu, Jan 26, 2017 at 6:54 AM, Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > >> index c56fb57f2991..7eb2f3041fde 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, >> unsigned int

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
* Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > > index c56fb57f2991..7eb2f3041fde 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, > > unsigned int new_cpu)

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
* Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > > index c56fb57f2991..7eb2f3041fde 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, > > unsigned int new_cpu) > >  

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Rik van Riel
On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > index c56fb57f2991..7eb2f3041fde 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, > unsigned int new_cpu) >  

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Rik van Riel
On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > index c56fb57f2991..7eb2f3041fde 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, > unsigned int new_cpu) >  

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
* Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > > > @@ -322,6 +308,16 @@ struct fpu { > >   unsigned char fpregs_active; > >   > >   /* > > +  * @fpregs_cached: > > +  * > > +  * This flag tells us whether this

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
* Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > > > @@ -322,6 +308,16 @@ struct fpu { > >   unsigned char fpregs_active; > >   > >   /* > > +  * @fpregs_cached: > > +  * > > +  * This flag tells us whether this context is loaded

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Rik van Riel
On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > @@ -322,6 +308,16 @@ struct fpu { >   unsigned char fpregs_active; >   >   /* > +  * @fpregs_cached: > +  * > +  * This flag tells us whether this context is loaded into a > CPU > +  * right now.

Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Rik van Riel
On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > @@ -322,6 +308,16 @@ struct fpu { >   unsigned char fpregs_active; >   >   /* > +  * @fpregs_cached: > +  * > +  * This flag tells us whether this context is loaded into a > CPU > +  * right now.

[PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
fpu->last_cpu records the last CPU a given FPU context structure was used on. This enables an important optimization: if a task schedules out to a kernel thread and then gets scheduled back after only FPU-inactive kernel threads executed, the FPU state in the registers is still intact and the FPU

[PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached

2017-01-26 Thread Ingo Molnar
fpu->last_cpu records the last CPU a given FPU context structure was used on. This enables an important optimization: if a task schedules out to a kernel thread and then gets scheduled back after only FPU-inactive kernel threads executed, the FPU state in the registers is still intact and the FPU