lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] x86/asm/entry/64: do not TRACE_IRQS fast SYSRET64 path

* Denys Vlasenko <dvlasenk@redhat.com> wrote:

> SYSRET code path has a small irq-off block.
> On this code path, TRACE_IRQS_ON can't be called right before interrupts
> are enabled for real, we can't clobber registers there.
> So current code does it earlier, in a safe place.
>
> But with this, TRACE_IRQS_OFF/ON frames just two fast instructions,
> which is ridiculous: now most of irq-off block is _outside_ of the framing.
>
> Do the same thing that we do on SYSCALL entry: do not track this irq-off block,
> it is very small to ever cause noticeable irq latency.
>
> Be careful: make sure that "jnz int_ret_from_sys_call_irqs_off" now does
> invoke TRACE_IRQS_OFF - move int_ret_from_sys_call_irqs_off label before
> TRACE_IRQS_OFF.

> @@ -345,8 +346,8 @@ tracesys_phase2:
> */
> GLOBAL(int_ret_from_sys_call)
> DISABLE_INTERRUPTS(CLBR_NONE)
> - TRACE_IRQS_OFF
> int_ret_from_sys_call_irqs_off:
> + TRACE_IRQS_OFF
> movl $_TIF_ALLWORK_MASK,%edi
> /* edi: mask to check */

This latter trick absolutely needs a comment, to keep future lockdep
developers from wondering about the mismatch and the weird label
placement ...

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-03-25 18:41    [W:0.151 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site