lkml.org 
[lkml]   [2016]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra()
On Thu, 15 Dec 2016, Peter Zijlstra wrote:
> On Thu, Dec 15, 2016 at 04:44:02PM -0000, Thomas Gleixner wrote:
> > void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
> > struct tss_struct *tss)
> > {
> > struct thread_struct *prev, *next;
> > + unsigned long tifp, tifn;
> >
> > prev = &prev_p->thread;
> > next = &next_p->thread;
> >
> > + tifn = task_thread_info(next_p)->flags;
> > + tifp = task_thread_info(prev_p)->flags;
> > + switch_to_bitmap(tss, prev, next, tifp, tifn);
> > +
> > + propagate_user_return_notify(prev_p, next_p);
> > +
> > + if ((tifp ^ tifn) & _TIF_BLOCKSTEP) {
> > unsigned long debugctl = get_debugctlmsr();
> >
> > debugctl &= ~DEBUGCTLMSR_BTF;
> > + if (tifn & _TIF_BLOCKSTEP)
> > debugctl |= DEBUGCTLMSR_BTF;
> > update_debugctlmsr(debugctl);
> > }
>
> Going by the toggle patter you have elsewhere, wouldn't that then be:
>
> if ((tifp ^ tifn) & _TIF_BLOCKSTEP) {
> unsigned long debugctl = get_debugctlmsr();
>
> debugctl ^= DEBUGCTLMSR_BTF;
> update_debugctlmsr(debugctl);
> }

See the next patch

\
 
 \ /
  Last update: 2016-12-15 18:30    [W:0.080 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site