Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch

2016-12-16 Thread Andy Lutomirski
On Fri, Dec 16, 2016 at 12:47 AM, Thomas Gleixner wrote: > On Thu, 15 Dec 2016, Andy Lutomirski wrote: >> On Thu, Dec 15, 2016 at 8:44 AM, Thomas Gleixner wrote: >> > +static inline void toggle_debugctlmsr(unsigned long mask) >> > +{ >> > + unsigned long msrval; >> > + >> > +#ifndef CONFIG_

Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch

2016-12-16 Thread Thomas Gleixner
On Thu, 15 Dec 2016, Andy Lutomirski wrote: > On Thu, Dec 15, 2016 at 8:44 AM, Thomas Gleixner wrote: > > +static inline void toggle_debugctlmsr(unsigned long mask) > > +{ > > + unsigned long msrval; > > + > > +#ifndef CONFIG_X86_DEBUGCTLMSR > > + if (boot_cpu_data.x86 < 6) > > +

Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch

2016-12-15 Thread Andy Lutomirski
On Thu, Dec 15, 2016 at 8:44 AM, Thomas Gleixner wrote: > Provide and use a seperate helper for toggling the DEBUGCTLMSR_BTF bit > instead of doing it open coded with a branch and eventually evaluating > boot_cpu_data twice. > > x86_64: > 3694 8505 16 122152fb7 Before > 3662

[patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch

2016-12-15 Thread Thomas Gleixner
Provide and use a seperate helper for toggling the DEBUGCTLMSR_BTF bit instead of doing it open coded with a branch and eventually evaluating boot_cpu_data twice. x86_64: 3694 8505 16 122152fb7 Before 3662 8505 16 121832f97 After i386: 5986 93881804 1