Thread (44 messages) 44 messages, 7 authors, 2024-08-30

Re: [PATCH v6 05/11] mm: Add fast_only bool to test_young and clear_young MMU notifiers

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2024-08-06 17:23:51
Also in: kvm, kvmarm, linux-doc, lkml

On Thu, Aug 01, 2024 at 04:13:40PM -0700, James Houghton wrote:
quoted hunk ↗ jump to hunk
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -106,6 +106,18 @@ struct mmu_notifier_ops {
         * clear_young is a lightweight version of clear_flush_young. Like the
         * latter, it is supposed to test-and-clear the young/accessed bitflag
         * in the secondary pte, but it may omit flushing the secondary tlb.
+        *
+        * The fast_only parameter indicates that this call should not block,
+        * and this function should not cause other MMU notifier calls to
+        * block. Usually this means that the implementation should be
+        * lockless.
+        *
+        * When called with fast_only, this notifier will be a no-op unless
+        * has_fast_aging is set on the struct mmu_notifier.
If you add a has_fast_aging I wonder if it is better to introduce new
ops instead? The semantics are a bit easier to explain that way

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help