31 Jan, 2009

1 commit

  • Impact: Optimization

    Several paravirt ops implementations simply return their arguments,
    the most obvious being the make_pte/pte_val class of operations on
    native.

    On 32-bit, the identity function is literally a no-op, as the calling
    convention uses the same registers for the first argument and return.
    On 64-bit, it can be implemented with a single "mov".

    This patch adds special identity functions for 32 and 64 bit argument,
    and machinery to recognize them and replace them with either nops or a
    mov as appropriate.

    At the moment, the only users for the identity functions are the
    pagetable entry conversion functions.

    The result is a measureable improvement on pagetable-heavy benchmarks
    (2-3%, reducing the pvops overhead from 5 to 2%).

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: H. Peter Anvin

    Jeremy Fitzhardinge
     

15 Aug, 2008

1 commit

  • Before:
    total: 3 errors, 1 warnings, 49 lines checked

    After:
    total: 2 errors, 1 warnings, 49 lines checked

    paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/paravirt_patch_32.o.*
    a78eea4264723e18c49dcfbe0ee0aae7 /tmp/paravirt_patch_32.o.after
    a78eea4264723e18c49dcfbe0ee0aae7 /tmp/paravirt_patch_32.o.before

    Signed-off-by: Paolo Ciarrocchi
    Signed-off-by: Ingo Molnar

    Paolo Ciarrocchi
     

08 Jul, 2008

1 commit

  • Don't conflate sysret and sysexit; they're different instructions with
    different semantics, and may be in use at the same time (at least
    within the same kernel, depending on whether its an Intel or AMD
    system).

    sysexit - just return to userspace, does no register restoration of
    any kind; must explicitly atomically enable interrupts.

    sysret - reloads flags from r11, so no need to explicitly enable
    interrupts on 64-bit, responsible for restoring usermode %gs

    Signed-off-by: Jeremy Fitzhardinge
    Cc: xen-devel
    Cc: Stephen Tweedie
    Cc: Eduardo Habkost
    Cc: Mark McLoughlin
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

30 Jan, 2008

1 commit