lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC] KVM: x86: SVM: don't expose PV_SEND_IPI feature with AVIC
    On Mon, 8 Nov 2021 at 20:48, Kele Huang <huangkele@bytedance.com> wrote:
    >
    > Currently, AVIC is disabled if x2apic feature is exposed to guest
    > or in-kernel PIT is in re-injection mode.
    >
    > We can enable AVIC with options:
    >
    > Kmod args:
    > modprobe kvm_amd avic=1 nested=0 npt=1
    > QEMU args:
    > ... -cpu host,-x2apic -global kvm-pit.lost_tick_policy=discard ...
    >
    > When LAPIC works in xapic mode, both AVIC and PV_SEND_IPI feature
    > can accelerate IPI operations for guest. However, the relationship
    > between AVIC and PV_SEND_IPI feature is not sorted out.
    >
    > In logical, AVIC accelerates most of frequently IPI operations
    > without VMM intervention, while the re-hooking of apic->send_IPI_xxx
    > from PV_SEND_IPI feature masks out it. People can get confused
    > if AVIC is enabled while getting lots of hypercall kvm_exits
    > from IPI.
    >
    > In performance, benchmark tool
    > https://lore.kernel.org/kvm/20171219085010.4081-1-ynorov@caviumnetworks.com/
    > shows below results:
    >
    > Test env:
    > CPU: AMD EPYC 7742 64-Core Processor
    > 2 vCPUs pinned 1:1
    > idle=poll
    >
    > Test result (average ns per IPI of lots of running):
    > PV_SEND_IPI : 1860
    > AVIC : 1390
    >
    > Besides, disscussions in https://lkml.org/lkml/2021/10/20/423
    > do have some solid performance test results to this.
    >
    > This patch fixes this by masking out PV_SEND_IPI feature when
    > AVIC is enabled in setting up of guest vCPUs' CPUID.

    This is the second time in community you bytedance guys post patches
    w/o evaluating ipi broadcast performance.
    https://lore.kernel.org/all/CANRm+Cx597FNRUCyVz1D=B6Vs2GX3Sw57X7Muk+yMpi_hb+v1w@mail.gmail.com/T/#u

    Wanpeng

    \
     
     \ /
      Last update: 2021-11-16 06:01    [W:3.088 / U:0.472 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site