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] [day] [month] [year] [list]
Message-ID: <ZDdcCd/KtOGnwKMv@liuwe-devbox-debian-v2>
Date:   Thu, 13 Apr 2023 01:34:01 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
        decui@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
        arnd@...db.de, x86@...nel.org, linux-kernel@...r.kernel.org,
        linux-hyperv@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 0/2] x86/hyperv: Exclude lazy TLB mode CPUs from
 enlightened TLB flushes

On Mon, Mar 27, 2023 at 06:16:05AM -0700, Michael Kelley wrote:
> The Hyper-V enlightened TLB remote flush function does not exclude
> lazy TLB mode CPUs like the equivalent native function. Limited
> telemetry shows that up to 80% of the CPUs being flushed are in
> lazy mode, so flushing them is unnecessary and wasteful.
> 
> The best place to exclude the lazy TLB mode CPUs is when copying
> the Linux cpumask to the Hyper-V VPset data structure, since the
> copying already processes CPUs one-by-one. Currently this copying
> function has the capabilty to exclude the calling CPU. Generalize
> this exclusion functionality to exclude CPUs based on a callback
> function that is invoked for each CPU.  Then for TLB flushing,
> use this callback function to check the lazy TLB mode status of
> each targeted CPU.
> 
> Patch 1 of this series does the generalization, and fixes up the
> one caller of the existing "exclude self" capability.
> 
> Patch 2 then implements the exclusion based on lazy TLB mode,
> using the generalization from Patch 1.
> 
> Michael Kelley (2):
>   x86/hyperv: Add callback filter to cpumask_to_vpset()
>   x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes
> 
>  arch/x86/hyperv/hv_apic.c      | 12 ++++++++----
>  arch/x86/hyperv/mmu.c          | 11 ++++++++++-
>  include/asm-generic/mshyperv.h | 22 ++++++++++++++--------
>  3 files changed, 32 insertions(+), 13 deletions(-)

Applied to hyperv-next. Thanks.

> 
> -- 
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ