VDSO clock function may be miss-optimised leading to hangs on SMP systems

Bug #1410741 reported by Andy Whitcroft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Andy Whitcroft
Trusty
Fix Released
Undecided
Unassigned
Utopic
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Andy Whitcroft

Bug Description

commit 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba
Author: Andy Lutomirski <email address hidden>
Date: Sun Dec 21 08:57:46 2014 -0800

    x86, vdso: Use asm volatile in __getcpu

    In Linux 3.18 and below, GCC hoists the lsl instructions in the
    pvclock code all the way to the beginning of __vdso_clock_gettime,
    slowing the non-paravirt case significantly. For unknown reasons,
    presumably related to the removal of a branch, the performance issue
    is gone as of

    e76b027e6408 x86,vdso: Use LSL unconditionally for vgetcpu

    but I don't trust GCC enough to expect the problem to stay fixed.

    There should be no correctness issue, because the __getcpu calls in
    __vdso_vlock_gettime were never necessary in the first place.

    Note to stable maintainers: In 3.18 and below, depending on
    configuration, gcc 4.9.2 generates code like this:

         9c3: 44 0f 03 e8 lsl %ax,%r13d
         9c7: 45 89 eb mov %r13d,%r11d
         9ca: 0f 03 d8 lsl %ax,%ebx

    This patch won't apply as is to any released kernel, but I'll send a
    trivial backported version if needed.

    Fixes: 51c19b4f5927 x86: vdso: pvclock gettime support
    Cc: <email address hidden> # 3.8+
    Cc: Marcelo Tosatti <email address hidden>
    Acked-by: Paolo Bonzini <email address hidden>
    Signed-off-by: Andy Lutomirski <email address hidden>

===
break-fix: 51c19b4f5927f5a646e93d69f73c7e89ea14e737 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba

Andy Whitcroft (apw)
Changed in linux (Ubuntu):
status: New → Triaged
assignee: nobody → Andy Whitcroft (apw)
milestone: none → ubuntu-15.02
description: updated
tags: added: kernel-bug-break-fix
Andy Whitcroft (apw)
Changed in linux (Ubuntu Trusty):
status: New → Confirmed
Changed in linux (Ubuntu Utopic):
status: New → Confirmed
Changed in linux (Ubuntu Vivid):
status: Triaged → Confirmed
Andy Whitcroft (apw)
Changed in linux (Ubuntu Vivid):
status: Confirmed → Fix Committed
Andy Whitcroft (apw)
Changed in linux (Ubuntu Vivid):
status: Fix Committed → Fix Released
Andy Whitcroft (apw)
Changed in linux (Ubuntu Utopic):
status: Confirmed → Fix Committed
Andy Whitcroft (apw)
Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
Andy Whitcroft (apw)
Changed in linux (Ubuntu Trusty):
status: Confirmed → Fix Committed
Andy Whitcroft (apw)
Changed in linux (Ubuntu Trusty):
status: Fix Committed → Fix Released
tags: removed: kernel-bug-break-fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.