Re: [PATCH v4 2/7] mm: multi-gen LRU: Have secondary MMUs participate in aging

2024-05-29 Thread Yu Zhao
On Wed, May 29, 2024 at 3:59 PM Sean Christopherson wrote: > > On Wed, May 29, 2024, Yu Zhao wrote: > > On Wed, May 29, 2024 at 12:05 PM James Houghton > > wrote: > > > > > > Secondary MMUs are currently consulted for access/age information at > > >

Re: [PATCH v4 2/7] mm: multi-gen LRU: Have secondary MMUs participate in aging

2024-05-29 Thread Yu Zhao
MMU notifiers except at > eviction time. > > Suggested-by: Yu Zhao > Signed-off-by: James Houghton This is not what I suggested, and it would have been done in the first place if it hadn't regressed the non-lockless case. NAK.

Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc)

2024-05-15 Thread Yu Zhao
On Wed, May 15, 2024 at 2:45 PM Erhard Furtner wrote: > > On Wed, 8 May 2024 20:21:11 +0200 > Erhard Furtner wrote: > > > Greetings! > > > > Got that on my dual CPU PowerMac G4 DP shortly after boot. This does not > > happen every time at bootup though: > > > > [...] > > kswapd0: page

Re: [PATCH 3/3] mm/lru_gen: Don't build multi-gen LRU page table walk code on architecture not supported

2023-06-27 Thread Yu Zhao
On Tue, Jun 27, 2023 at 5:48 AM Aneesh Kumar K V wrote: > > On 6/26/23 10:34 PM, Yu Zhao wrote: > > On Mon, Jun 26, 2023 at 4:52 AM Aneesh Kumar K V > > wrote: > >> > >> On 6/26/23 1:04 AM, Yu Zhao wrote: > >>> On Sat, Jun 24, 2023 at 8:54 AM An

Re: [PATCH mm-unstable v2 07/10] kvm/powerpc: add kvm_arch_test_clear_young()

2023-06-20 Thread Yu Zhao
On Tue, Jun 20, 2023 at 1:48 AM Nicholas Piggin wrote: > > On Sat May 27, 2023 at 9:44 AM AEST, Yu Zhao wrote: > > Implement kvm_arch_test_clear_young() to support the fast path in > > mmu_notifier_ops->test_clear_young(). > > > > It focuses on a simple case, i.e.

Re: [6.4.0-rc7-next-20230620] Boot failure on IBM Power LPAR

2023-06-20 Thread Yu Zhao
On Tue, Jun 20, 2023 at 05:41:57PM +0530, Sachin Sant wrote: > 6.4.0-rc7-next-20230620 fails to boot on IBM Power LPAR with following Sorry for hijacking this thread -- I've been seeing another crash on NV since -rc1 but I haven't had the time to bisect. Just FYI. [0.814500] BUG: Unable to

Re: [PATCH mm-unstable v2 06/10] kvm/powerpc: make radix page tables RCU safe

2023-06-20 Thread Yu Zhao
On Tue, Jun 20, 2023 at 12:33 AM Nicholas Piggin wrote: > > On Sat May 27, 2023 at 9:44 AM AEST, Yu Zhao wrote: > > KVM page tables are currently not RCU safe against remapping, i.e., > > kvmppc_unmap_free_pmd_entry_table() et al. The previous > > Minor nit but the &quo

Re: [PATCH mm-unstable v2 00/10] mm/kvm: locklessly clear the accessed bit

2023-06-19 Thread Yu Zhao
On Fri, Jun 9, 2023 at 3:08 AM Paolo Bonzini wrote: > > On 5/27/23 01:44, Yu Zhao wrote: > > TLDR > > > > This patchset adds a fast path to clear the accessed bit without > > taking kvm->mmu_lock. It can significantly improve the performance of > > gue

Re: [PATCH v2 07/23 replacement] mips: add pte_unmap() to balance pte_offset_map()

2023-06-18 Thread Yu Zhao
On Fri, Jun 16, 2023 at 9:54 PM Yu Zhao wrote: > > On Thu, Jun 15, 2023 at 04:02:43PM -0700, Hugh Dickins wrote: > > To keep balance in future, __update_tlb() remember to pte_unmap() after > > pte_offset_map(). This is an odd case, since the caller has already done >

Re: kvm/arm64: Spark benchmark

2023-06-18 Thread Yu Zhao
On Fri, Jun 9, 2023 at 7:04 AM Marc Zyngier wrote: > > On Fri, 09 Jun 2023 01:59:35 +0100, > Yu Zhao wrote: > > > > TLDR > > > > Apache Spark spent 12% less time sorting four billion random integers > > twenty times (in ~4 hours) after this patchset [

Re: kvm/x86: multichase benchmark

2023-06-18 Thread Yu Zhao
On Thu, Jun 8, 2023 at 6:59 PM Yu Zhao wrote: > > TLDR > > Multichase in 64 microVMs achieved 6% more total samples (in ~4 hours) after > this patchset [1]. > > Hardware > > HOST $ lscpu > Architecture:x86_64 > CPU op-mode(s):

Re: [PATCH v2 07/23 replacement] mips: add pte_unmap() to balance pte_offset_map()

2023-06-16 Thread Yu Zhao
> but my two naive attempts to clean that up did more harm than good. > > Tested-by: Nathan Chancellor > Signed-off-by: Hugh Dickins FWIW: Tested-by: Yu Zhao There is another problem, likely caused by khugepaged, happened multiple times. But I don't think it's related to your ser

Re: [PATCH v2 07/23] mips: update_mmu_cache() can replace __update_tlb()

2023-06-15 Thread Yu Zhao
On Wed, Jun 14, 2023 at 04:17:58PM -0700, Nathan Chancellor wrote: > Hi Hugh, > > On Thu, Jun 08, 2023 at 12:17:24PM -0700, Hugh Dickins wrote: > > Don't make update_mmu_cache() a wrapper around __update_tlb(): call it > > directly, and use the ptep (or pmdp) provided by the caller, instead of >

Re: [PATCH mm-unstable v2 01/10] mm/kvm: add mmu_notifier_ops->test_clear_young()

2023-06-08 Thread Yu Zhao
On Tue, Jun 6, 2023 at 2:34 AM Tzung-Bi Shih wrote: > > On Fri, May 26, 2023 at 05:44:26PM -0600, Yu Zhao wrote: > > +/* > > + * Architectures that implement kvm_arch_test_clear_young() should override > > + * kvm_arch_has_test_clear_young(). > > + * > &g

kvm/x86: multichase benchmark

2023-06-08 Thread Yu Zhao
TLDR Multichase in 64 microVMs achieved 6% more total samples (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture:x86_64 CPU op-mode(s):32-bit, 64-bit Address sizes: 43 bits physical, 48 bits virtual Byte Order:

kvm/arm64: Spark benchmark

2023-06-08 Thread Yu Zhao
TLDR Apache Spark spent 12% less time sorting four billion random integers twenty times (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s):

kvm/powerpc: memcached benchmark

2023-06-08 Thread Yu Zhao
TLDR Memcached achieved 10% more operations per second (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s):184 On-line CPU(s) list: 0-183 Model name:POWER9 (raw),

Re: [PATCH mm-unstable v2 04/10] kvm/arm64: make stage2 page tables RCU safe

2023-05-31 Thread Yu Zhao
On Wed, May 31, 2023 at 5:23 PM Oliver Upton wrote: > > On Wed, May 31, 2023 at 05:10:52PM -0600, Yu Zhao wrote: > > On Wed, May 31, 2023 at 1:28 PM Oliver Upton wrote: > > > On Tue, May 30, 2023 at 02:06:55PM -0600, Yu Zhao wrote: > > > > On Tue, May

Re: [PATCH mm-unstable v2 04/10] kvm/arm64: make stage2 page tables RCU safe

2023-05-31 Thread Yu Zhao
On Wed, May 31, 2023 at 1:28 PM Oliver Upton wrote: > > On Tue, May 30, 2023 at 02:06:55PM -0600, Yu Zhao wrote: > > On Tue, May 30, 2023 at 1:37 PM Oliver Upton wrote: > > > > > > Hi Yu, > > > > > > On Sat, May 27, 2023 at 02:13:07PM -0600, Yu Z

Re: [PATCH mm-unstable v2 05/10] kvm/arm64: add kvm_arch_test_clear_young()

2023-05-31 Thread Yu Zhao
On Wed, May 31, 2023 at 1:56 PM Oliver Upton wrote: > > Hi Yu, > > On Fri, May 26, 2023 at 05:44:30PM -0600, Yu Zhao wrote: > > Implement kvm_arch_test_clear_young() to support the fast path in > > mmu_notifier_ops->test_clear_young(). > > > > It focuse

Re: [PATCH mm-unstable v2 04/10] kvm/arm64: make stage2 page tables RCU safe

2023-05-30 Thread Yu Zhao
On Tue, May 30, 2023 at 1:37 PM Oliver Upton wrote: > > Hi Yu, > > On Sat, May 27, 2023 at 02:13:07PM -0600, Yu Zhao wrote: > > On Sat, May 27, 2023 at 12:08 PM Oliver Upton > > wrote: > > > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/p

Re: [PATCH mm-unstable v2 04/10] kvm/arm64: make stage2 page tables RCU safe

2023-05-27 Thread Yu Zhao
On Sat, May 27, 2023 at 12:08 PM Oliver Upton wrote: > > Yu, > > On Fri, May 26, 2023 at 05:44:29PM -0600, Yu Zhao wrote: > > Stage2 page tables are currently not RCU safe against unmapping or VM > > destruction. The previous mmu_notifier_ops members rely on > >

[PATCH mm-unstable v2 10/10] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-05-26 Thread Yu Zhao
B after checking PTE young for page reference" was included so that the comparison is apples to apples. https://lore.kernel.org/r/20220706112041.3831-1-21cn...@gmail.com/ Signed-off-by: Yu Zhao --- Documentation/admin-guide/mm/multigen_lru.rst | 6 +- include/linux/mmzone.h

[PATCH mm-unstable v2 09/10] kvm/x86: add kvm_arch_test_clear_young()

2023-05-26 Thread Yu Zhao
kvm->mmu_lock. Complex cases fall back to the existing slow path where kvm->mmu_lock is then taken. Signed-off-by: Yu Zhao --- arch/x86/include/asm/kvm_host.h | 7 +++ arch/x86/kvm/mmu/tdp_mmu.c | 34 + 2 files changed, 41 insertions(+) diff --g

[PATCH mm-unstable v2 08/10] kvm/x86: move tdp_mmu_enabled and shadow_accessed_mask

2023-05-26 Thread Yu Zhao
tdp_mmu_enabled and shadow_accessed_mask are needed to implement kvm_arch_has_test_clear_young(). Signed-off-by: Yu Zhao --- arch/x86/include/asm/kvm_host.h | 6 ++ arch/x86/kvm/mmu.h | 6 -- arch/x86/kvm/mmu/spte.h | 1 - 3 files changed, 6 insertions(+), 7

[PATCH mm-unstable v2 07/10] kvm/powerpc: add kvm_arch_test_clear_young()

2023-05-26 Thread Yu Zhao
ing kvm->mmu_lock. Complex cases fall back to the existing slow path where kvm->mmu_lock is then taken. Signed-off-by: Yu Zhao --- arch/powerpc/include/asm/kvm_host.h| 8 arch/powerpc/include/asm/kvm_ppc.h | 1 + arch/powerpc/kvm/book3s.c | 6 +++ arch/powerpc/kvm

[PATCH mm-unstable v2 06/10] kvm/powerpc: make radix page tables RCU safe

2023-05-26 Thread Yu Zhao
oes not take kvm->mmu_lock. To implement kvm_arch_test_clear_young() for that path, orphan page tables need to be freed by RCU. Unmapping, specifically kvm_unmap_radix(), does not free page tables, hence not a concern. Signed-off-by: Yu Zhao --- arch/powerpc/kvm/book3s_64_mmu_radix.c | 6 +++

[PATCH mm-unstable v2 05/10] kvm/arm64: add kvm_arch_test_clear_young()

2023-05-26 Thread Yu Zhao
kvm->mmu_lock. Complex cases fall back to the existing slow path where kvm->mmu_lock is then taken. Signed-off-by: Yu Zhao --- arch/arm64/include/asm/kvm_host.h | 6 ++ arch/arm64/kvm/mmu.c | 36 +++ 2 files changed, 42 insertions(+) diff --g

[PATCH mm-unstable v2 00/10] mm/kvm: locklessly clear the accessed bit

2023-05-26 Thread Yu Zhao
: rmap: Don't flush TLB after checking PTE young for page reference" was included so that the comparison is apples to apples. https://lore.kernel.org/r/20220706112041.3831-1-21cn...@gmail.com/ Yu Zhao (10): mm/kvm: add mmu_notifier_ops->test_clear_young() mm/kvm: use mmu

[PATCH mm-unstable v2 04/10] kvm/arm64: make stage2 page tables RCU safe

2023-05-26 Thread Yu Zhao
u_lock. To implement kvm_arch_test_clear_young() for that path, unmapped page tables need to be freed by RCU and kvm_free_stage2_pgd() needs to be after mmu_notifier_unregister(). Remapping, specifically stage2_free_removed_table(), is already RCU safe. Signed-off-by: Yu Zhao --- arch/arm64/inclu

[PATCH mm-unstable v2 02/10] mm/kvm: use mmu_notifier_ops->test_clear_young()

2023-05-26 Thread Yu Zhao
Replace test_young() and clear_young() with test_clear_young(). Signed-off-by: Yu Zhao --- include/linux/mmu_notifier.h | 29 ++- include/trace/events/kvm.h | 15 -- mm/mmu_notifier.c| 42 virt/kvm/kvm_main.c | 54

[PATCH mm-unstable v2 01/10] mm/kvm: add mmu_notifier_ops->test_clear_young()

2023-05-26 Thread Yu Zhao
hen taken. test_clear_young() can also operate on a range of KVM PTEs individually according to a bitmap, if the caller provides it. Signed-off-by: Yu Zhao --- include/linux/kvm_host.h | 22 +++ include/linux/mmu_notifier.h | 52 mm/mmu_notifier.c

[PATCH mm-unstable v2 03/10] kvm/arm64: export stage2_try_set_pte() and macros

2023-05-26 Thread Yu Zhao
stage2_try_set_pte() and KVM_PTE_LEAF_ATTR_LO_S2_AF are needed to implement kvm_arch_test_clear_young(). Signed-off-by: Yu Zhao --- arch/arm64/include/asm/kvm_pgtable.h | 53 arch/arm64/kvm/hyp/pgtable.c | 53 2 files changed, 53

Re: [PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 1:29 PM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 12:58 PM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > > > On Thu, Feb 23, 2023

Re: [PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 12:58 PM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 12:11 PM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > > > > As alluded t

Re: [PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 12:11 PM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 10:43 AM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 16, 2023, Yu Zhao wrote: > > > > kswapd (

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 12:21 PM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 11:47 AM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > > > On Thu, Feb 23, 2023

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 11:47 AM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 11:24 AM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > > > On Thu, Feb 23, 2023

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 11:24 AM Sean Christopherson wrote: > > On Thu, Feb 23, 2023, Yu Zhao wrote: > > On Thu, Feb 23, 2023 at 10:09 AM Sean Christopherson > > wrote: > > > > I'll take a look at that series. clear_bit() probably won't cause any > > >

Re: [PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 10:43 AM Sean Christopherson wrote: > > On Thu, Feb 16, 2023, Yu Zhao wrote: > > An existing selftest can quickly demonstrate the effectiveness of this > > patch. On a generic workstation equipped with 128 CPUs and 256GB DRAM: > > Not my area o

Re: [PATCH mm-unstable v1 1/5] mm/kvm: add mmu_notifier_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 10:14 AM Sean Christopherson wrote: > > On Thu, Feb 16, 2023, Yu Zhao wrote: > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > index 9c60384b5ae0..1b465df4a93d 100644 > > --- a/virt/kvm/kvm_main.c > > +++ b/virt/kvm/kvm_main.c &

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 10:09 AM Sean Christopherson wrote: > > On Wed, Feb 22, 2023, Yu Zhao wrote: > > On Fri, Feb 17, 2023 at 9:27 AM Sean Christopherson > > wrote: > > > > > > On Thu, Feb 16, 2023, Yu Zhao wrote: > > > > diff --git a/arc

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-23 Thread Yu Zhao
On Thu, Feb 23, 2023 at 2:03 AM Marc Zyngier wrote: > > On Thu, 23 Feb 2023 03:58:47 +0000, > Yu Zhao wrote: > > > > On Fri, Feb 17, 2023 at 2:00 AM Marc Zyngier wrote: > > > > > > On Fri, 17 Feb 2023 04:21:28 +, > > > Yu Zhao wrote: > &g

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-22 Thread Yu Zhao
On Fri, Feb 17, 2023 at 9:27 AM Sean Christopherson wrote: > > On Thu, Feb 16, 2023, Yu Zhao wrote: > > diff --git a/arch/x86/include/asm/kvm_host.h > > b/arch/x86/include/asm/kvm_host.h > > index 6aaae18f1854..d2995c9e8f07 100644 > > --- a/arch/x86/include/asm

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-22 Thread Yu Zhao
I would > > prefer to be Cc'ed on an entire series (to gather context) than just an > > individual patch. > > +1 > > > > > On Thu, Feb 16, 2023 at 09:12:28PM -0700, Yu Zhao wrote: > > > This patch adds kvm_arch_test_clear_young() for the vast majority of &g

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-22 Thread Yu Zhao
st an > individual patch. Will do. Thank you. > On Thu, Feb 16, 2023 at 09:12:28PM -0700, Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > > VMs that are not pKVM and run on hardware that sets the accessed bit > > in KVM page tables

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-22 Thread Yu Zhao
On Fri, Feb 17, 2023 at 2:00 AM Marc Zyngier wrote: > > On Fri, 17 Feb 2023 04:21:28 +0000, > Yu Zhao wrote: > > > > On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > > > > > This patch adds kvm_arch_test_clear_young() for the vast majority of > >

Re: [PATCH mm-unstable v1 4/5] kvm/powerpc: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not nested and run on hardware with Radix MMU enabled. > > It relies on two techniques, RCU and cmpxchg, to safely test and clear > the ac

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not pKVM and run on hardware that sets the accessed bit > in KVM page tables. > > It relies on two techniques, RCU and cmpxchg, to saf

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not nested and run on hardware that sets the accessed bit > in TDP MMU page tables. > > It relies on two techniques, RCU and cmpxchg, to saf

[PATCH mm-unstable v1 4/5] kvm/powerpc: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
being freed while the latter clears the accessed bit atomically against both the hardware and other software page table walkers. Signed-off-by: Yu Zhao --- arch/powerpc/include/asm/kvm_host.h| 18 ++ arch/powerpc/include/asm/kvm_ppc.h | 14 + arch/powerpc/kvm/book3s.c

[PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-16 Thread Yu Zhao
25.35% rmap_walk_file 25.28% folio_referenced_one 23.87% __mmu_notifier_clear_flush_young 23.69% kvm_mmu_notifier_clear_flush_young => 18.98% _raw_write_lock Signed-off-by: Yu Zhao --- include/linux/mmzone.h | 6 +

[PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
KVM page tables from being freed while the latter clears the accessed bit atomically against both the hardware and other software page table walkers. Signed-off-by: Yu Zhao --- arch/arm64/include/asm/kvm_host.h | 7 +++ arch/arm64/include/asm/kvm_pgtable.h| 8 +++ arch/arm64/include/asm

[PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
protects KVM page tables from being freed while the latter clears the accessed bit atomically against both the hardware and other software page table walkers. Signed-off-by: Yu Zhao --- arch/x86/include/asm/kvm_host.h | 27 ++ arch/x86/kvm/mmu/spte.h | 12 -- arch

[PATCH mm-unstable v1 1/5] mm/kvm: add mmu_notifier_test_clear_young()

2023-02-16 Thread Yu Zhao
ing the corresponding bit in the bitmap to 0 or 1, and the new value will be 1 or 0 for a young KVM PTE. Signed-off-by: Yu Zhao --- include/linux/kvm_host.h | 29 ++ include/linux/mmu_notifier.h | 40 + mm/mmu_notifier.c|

[PATCH mm-unstable v1 0/5] mm/kvm: lockless accessed bit harvest

2023-02-16 Thread Yu Zhao
hensive benchmarks are coming soon. Yu Zhao (5): mm/kvm: add mmu_notifier_test_clear_young() kvm/x86: add kvm_arch_test_clear_young() kvm/arm64: add kvm_arch_test_clear_young() kvm/powerpc: add kvm_arch_test_clear_young() mm: multi-gen LRU: use mmu_notifier_test_clear_young() arch/arm64/incl