lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] locking/atomic/x86: Introduce try_cmpxchg64
    On Tue, May 10, 2022 at 6:55 PM Peter Zijlstra <peterz@infradead.org> wrote:
    >
    > On Tue, May 10, 2022 at 05:42:17PM +0200, Uros Bizjak wrote:
    > > This patch adds try_cmpxchg64 to improve code around cmpxchg8b. While
    > > the resulting code improvements on x86_64 are minor (a compare and a move saved),
    > > the improvements on x86_32 are quite noticeable. The code improves from:
    >
    > What user of cmpxchg64 is this?

    This is cmpxchg64 in pi_try_set_control from
    arch/x86/kvm/vmx/posted_intr.c, as shown in a RFC patch [1].

    There are some more opportunities for try_cmpxchg64 in KVM, namely
    fast_pf_fix_direct_spte in arch/x86/kvm/mmu/mmu.c and
    tdp_mmu_set_spte_atomic in arch/x86/kvm/mmu/tdp_mmu.c

    [1] https://www.spinics.net/lists/kvm/msg266042.html

    Uros.

    \
     
     \ /
      Last update: 2022-05-10 19:09    [W:7.883 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site