From: Sean Christopherson <seanjc@google•com>
To: James Houghton <jthoughton@google•com>
Cc: kvm@vger•kernel.org, linux-doc@vger•kernel.org,
Catalin Marinas <catalin.marinas@arm•com>,
Atish Patra <atishp@atishpatra•org>,
linux-kernel@vger•kernel.org, kvmarm@lists•linux.dev,
linux-kselftest@vger•kernel.org,
Raghavendra Rao Ananta <rananta@google•com>,
linux-riscv@lists•infradead.org, Shuah Khan <shuah@kernel•org>,
Yu Zhao <yuzhao@google•com>, Jonathan Corbet <corbet@lwn•net>,
Anup Patel <anup@brainfault•org>,
Huacai Chen <chenhuacai@kernel•org>,
David Rientjes <rientjes@google•com>,
Zenghui Yu <yuzenghui@huawei•com>,
Axel Rasmussen <axelrasmussen@google•com>,
linux-mips@vger•kernel.org, Albert Ou <aou@eecs•berkeley.edu>,
Ryan Roberts <ryan.roberts@arm•com>,
Will Deacon <will@kernel•org>,
Suzuki K Poulose <suzuki.poulose@arm•com>,
Shaoqin Huang <shahuang@redhat•com>,
Nicholas Piggin <npiggin@gmail•com>,
Bibo Mao <maobibo@loongson•cn>,
loongarch@lists•linux.dev,
Paul Walmsley <paul.walmsley@sifive•com>,
David Matlack <dmatlack@google•com>,
Palmer Dabbelt <palmer@dabbelt•com >,
linux-arm-kernel@lists•infradead.org, linux-mm@kvack•org,
Ankit Agrawal <ankita@nvidia•com>,
Oliver Upton <oliver.upton@linux•dev>,
James Morse <james.morse@arm•com>,
kvm-riscv@lists•infradead.org, Marc Zyngier <maz@kernel•org>,
Paolo Bonzini <pbonzini@redhat•com>,
Andrew Morton <akpm@linux-foundation•org>,
Tianrui Zhao <zhaotianrui@loongson•cn>,
linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v4 3/7] KVM: Add lockless memslot walk to KVM
Date: Wed, 29 May 2024 14:51:24 -0700 [thread overview]
Message-ID: <ZlejXCYIuJ7_DlwL@google.com> (raw)
In-Reply-To: <20240529180510.2295118-4-jthoughton@google.com>
On Wed, May 29, 2024, James Houghton wrote:
> @@ -686,10 +694,12 @@ static __always_inline int kvm_handle_hva_range(struct mmu_notifier *mn,
> return __kvm_handle_hva_range(kvm, &range).ret;
> }
>
> -static __always_inline int kvm_handle_hva_range_no_flush(struct mmu_notifier *mn,
> - unsigned long start,
> - unsigned long end,
> - gfn_handler_t handler)
> +static __always_inline int kvm_handle_hva_range_no_flush(
> + struct mmu_notifier *mn,
> + unsigned long start,
> + unsigned long end,
> + gfn_handler_t handler,
> + bool lockless)
Unnecessary and unwanted style change.
> {
> struct kvm *kvm = mmu_notifier_to_kvm(mn);
> const struct kvm_mmu_notifier_range range = {
> @@ -699,6 +709,7 @@ static __always_inline int kvm_handle_hva_range_no_flush(struct mmu_notifier *mn
> .on_lock = (void *)kvm_null_fn,
> .flush_on_ret = false,
> .may_block = false,
> + .lockless = lockless,
Why add @lockess to kvm_handle_hva_range_no_flush()? Both callers immediately
pass %false, and conceptually, locking is always optional for a "no flush" variant.
> };
>
> return __kvm_handle_hva_range(kvm, &range).ret;
> @@ -889,7 +900,8 @@ static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn,
> * cadence. If we find this inaccurate, we might come up with a
> * more sophisticated heuristic later.
> */
> - return kvm_handle_hva_range_no_flush(mn, start, end, kvm_age_gfn);
> + return kvm_handle_hva_range_no_flush(mn, start, end,
> + kvm_age_gfn, false);
> }
>
> static int kvm_mmu_notifier_test_young(struct mmu_notifier *mn,
> @@ -899,7 +911,7 @@ static int kvm_mmu_notifier_test_young(struct mmu_notifier *mn,
> trace_kvm_test_age_hva(address);
>
> return kvm_handle_hva_range_no_flush(mn, address, address + 1,
> - kvm_test_age_gfn);
> + kvm_test_age_gfn, false);
> }
>
> static void kvm_mmu_notifier_release(struct mmu_notifier *mn,
> --
> 2.45.1.288.g0e0cd299f1-goog
>
next prev parent reply other threads:[~2024-05-29 22:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 18:05 [PATCH v4 0/7] mm: multi-gen LRU: Walk secondary MMU page tables while aging James Houghton
2024-05-29 18:05 ` [PATCH v4 1/7] mm/Kconfig: Add LRU_GEN_WALKS_SECONDARY_MMU James Houghton
2024-05-29 18:05 ` [PATCH v4 2/7] mm: multi-gen LRU: Have secondary MMUs participate in aging James Houghton
2024-05-29 21:03 ` Yu Zhao
2024-05-29 21:59 ` Sean Christopherson
2024-05-29 22:21 ` Yu Zhao
2024-05-29 22:58 ` Sean Christopherson
2024-05-30 1:08 ` James Houghton
2024-05-31 6:05 ` Yu Zhao
2024-05-31 7:02 ` Oliver Upton
2024-05-31 16:45 ` Yu Zhao
2024-05-31 18:41 ` Oliver Upton
2024-06-03 22:45 ` James Houghton
2024-06-03 23:03 ` Sean Christopherson
2024-06-03 23:16 ` James Houghton
2024-06-04 0:23 ` Sean Christopherson
2024-05-31 7:24 ` Oliver Upton
2024-05-31 20:31 ` Yu Zhao
2024-05-31 21:06 ` David Matlack
2024-05-31 21:09 ` David Matlack
2024-05-31 21:18 ` Oliver Upton
2024-05-29 18:05 ` [PATCH v4 3/7] KVM: Add lockless memslot walk to KVM James Houghton
2024-05-29 21:51 ` Sean Christopherson [this message]
2024-05-30 3:26 ` James Houghton
2024-05-29 18:05 ` [PATCH v4 4/7] KVM: Move MMU lock acquisition for test/clear_young to architecture James Houghton
2024-05-29 21:55 ` Sean Christopherson
2024-05-30 3:27 ` James Houghton
2024-05-29 18:05 ` [PATCH v4 5/7] KVM: x86: Relax locking for kvm_test_age_gfn and kvm_age_gfn James Houghton
2024-05-29 18:05 ` [PATCH v4 6/7] KVM: arm64: " James Houghton
2024-05-31 19:11 ` Oliver Upton
2024-05-31 19:18 ` Oliver Upton
2024-06-04 22:20 ` James Houghton
2024-06-04 23:00 ` Oliver Upton
2024-06-04 23:36 ` Sean Christopherson
2024-05-29 18:05 ` [PATCH v4 7/7] KVM: selftests: Add multi-gen LRU aging to access_tracking_perf_test James Houghton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZlejXCYIuJ7_DlwL@google.com \
--to=seanjc@google$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=ankita@nvidia$(echo .)com \
--cc=anup@brainfault$(echo .)org \
--cc=aou@eecs$(echo .)berkeley.edu \
--cc=atishp@atishpatra$(echo .)org \
--cc=axelrasmussen@google$(echo .)com \
--cc=catalin.marinas@arm$(echo .)com \
--cc=chenhuacai@kernel$(echo .)org \
--cc=corbet@lwn$(echo .)net \
--cc=dmatlack@google$(echo .)com \
--cc=james.morse@arm$(echo .)com \
--cc=jthoughton@google$(echo .)com \
--cc=kvm-riscv@lists$(echo .)infradead.org \
--cc=kvm@vger$(echo .)kernel.org \
--cc=kvmarm@lists$(echo .)linux.dev \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=linux-mips@vger$(echo .)kernel.org \
--cc=linux-mm@kvack$(echo .)org \
--cc=linux-riscv@lists$(echo .)infradead.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=loongarch@lists$(echo .)linux.dev \
--cc=maobibo@loongson$(echo .)cn \
--cc=maz@kernel$(echo .)org \
--cc=npiggin@gmail$(echo .)com \
--cc=oliver.upton@linux$(echo .)dev \
--cc=palmer@dabbelt$(echo .)com \
--cc=paul.walmsley@sifive$(echo .)com \
--cc=pbonzini@redhat$(echo .)com \
--cc=rananta@google$(echo .)com \
--cc=rientjes@google$(echo .)com \
--cc=ryan.roberts@arm$(echo .)com \
--cc=shahuang@redhat$(echo .)com \
--cc=shuah@kernel$(echo .)org \
--cc=suzuki.poulose@arm$(echo .)com \
--cc=will@kernel$(echo .)org \
--cc=yuzenghui@huawei$(echo .)com \
--cc=yuzhao@google$(echo .)com \
--cc=zhaotianrui@loongson$(echo .)cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox