lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Jun 2019 12:32:33 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     LKML <linux-kernel@...r.kernel.org>, kvm <kvm@...r.kernel.org>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>
Subject: Re: [PATCH v2 0/3] KVM: LAPIC: Implement Exitless Timer

On Thu, 6 Jun 2019 at 13:31, Wanpeng Li <kernellwp@...il.com> wrote:
>
> Dedicated instances are currently disturbed by unnecessary jitter due
> to the emulated lapic timers fire on the same pCPUs which vCPUs resident.
> There is no hardware virtual timer on Intel for guest like ARM. Both
> programming timer in guest and the emulated timer fires incur vmexits.
> This patchset tries to avoid vmexit which is incurred by the emulated
> timer fires in dedicated instance scenario.
>
> When nohz_full is enabled in dedicated instances scenario, the unpinned
> timer will be moved to the nearest busy housekeepers after commit 444969223c8
> ("sched/nohz: Fix affine unpinned timers mess"). However, KVM always makes
> lapic timer pinned to the pCPU which vCPU residents, the reason is explained
> by commit 61abdbe0 (kvm: x86: make lapic hrtimer pinned). Actually, these
> emulated timers can be offload to the housekeeping cpus since APICv
> is really common in recent years. The guest timer interrupt is injected by
> posted-interrupt which is delivered by housekeeping cpu once the emulated
> timer fires.
>
> The host admin should fine tuned, e.g. dedicated instances scenario w/
> nohz_full cover the pCPUs which vCPUs resident, several pCPUs surplus
> for housekeeping, disable mwait/hlt/pause vmexits to occupy the pCPUs,
> fortunately preemption timer is disabled after mwait is exposed to
> guest which makes emulated timer offload can be possible.
> 3%~5% redis performance benefit can be observed on Skylake server.

w/o patchset:

                             VM-EXIT    Samples  Samples%     Time%
Min Time    Max Time         Avg time

  EXTERNAL_INTERRUPT      42916    49.43%    39.30%      0.47us
106.09us      0.71us ( +-   1.09% )

w/ patchset:

                             VM-EXIT    Samples  Samples%     Time%
Min Time    Max Time         Avg time

  EXTERNAL_INTERRUPT       6871     9.29%     2.96%      0.44us
57.88us      0.72us ( +-   4.02% )

Regards,
Wanpeng Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ