[lkml]   [2012]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[ 11/75] xen: correctly check for pending events when restoring irq flags
    3.3-stable review patch.  If anyone has any objections, please let me know.


    From: David Vrabel <>

    commit 7eb7ce4d2e8991aff4ecb71a81949a907ca755ac upstream.

    In xen_restore_fl_direct(), xen_force_evtchn_callback() was being
    called even if no events were pending. This resulted in (depending on
    workload) about a 100 times as many xen_version hypercalls as

    Fix this by correcting the sense of the conditional jump.

    This seems to give a significant performance benefit for some

    There is some subtle tricksy "..since the check here is trying to
    check both pending and masked in a single cmpw, but I think this is
    correct. It will call check_events now only when the combined
    mask+pending word is 0x0001 (aka unmasked, pending)." (Ian)

    Acked-by: Ian Campbell <>
    Signed-off-by: David Vrabel <>
    Signed-off-by: Konrad Rzeszutek Wilk <>
    Signed-off-by: Greg Kroah-Hartman <>

    arch/x86/xen/xen-asm.S | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/x86/xen/xen-asm.S
    +++ b/arch/x86/xen/xen-asm.S
    @@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct)

    /* check for unmasked and pending */
    cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
    - jz 1f
    + jnz 1f
    2: call check_events

     \ /
      Last update: 2012-05-04 23:21    [W:0.024 / U:65.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site