Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1542911
| Path | csiph.com!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thomas Gleixner <tglx@linutronix.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() |
| Date | Thu, 15 Dec 2016 18:30:02 +0100 |
| Message-ID | <sOI0W-9O-9@gated-at.bofh.it> (permalink) |
| References | <sOHoe-87a-13@gated-at.bofh.it> <sOHoe-87a-37@gated-at.bofh.it> <sOI0W-9O-11@gated-at.bofh.it> |
| User-Agent | Alpine 2.20 (DEB 67 2015-01-07) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | LKML <linux-kernel@vger.kernel.org>, x86@kernel.org, Kyle Huey <khuey@kylehuey.com>, Andy Lutomirski <luto@kernel.org> |
| X-Original-Date | Thu, 15 Dec 2016 18:26:28 +0100 (CET) |
| X-Original-Message-ID | <alpine.DEB.2.20.1612151826120.3470@nanos> |
| X-Original-References | <20161215162648.061449202@linutronix.de> <20161215164240.736387680@linutronix.de> <20161215172015.GZ3124@twins.programming.kicks-ass.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1542911 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch 0/3] x86/process: Optimize __switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
[patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Andy Lutomirski <luto@amacapital.net> - 2016-12-15 18:30 +0100
Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Thomas Gleixner <tglx@linutronix.de> - 2016-12-16 10:00 +0100
Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Andy Lutomirski <luto@amacapital.net> - 2016-12-16 20:30 +0100
[patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 18:30 +0100
Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Peter Zijlstra <peterz@infradead.org> - 2016-12-15 18:40 +0100
Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Andy Lutomirski <luto@amacapital.net> - 2016-12-15 18:30 +0100
Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Peter Zijlstra <peterz@infradead.org> - 2016-12-15 18:30 +0100
csiph-web