lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] mmu_notifiers: Restore documentation for .invalidate_range()
    Date
    The .invalidate_range() callback is called by
    mmu_notifier_invalidate_range() which is often called while holding
    the ptl spin-lock. Therefore any implementations of this callback must
    not sleep. This was originally documented when the call back was added
    in commit 0f0a327fa12c ("mmu_notifier: add the callback for
    mmu_notifier_invalidate_range()") but appears to have been
    inadvertently removed by commit 5ff7091f5a2c ("mm, mmu_notifier:
    annotate mmu notifiers with blockable invalidate callbacks").

    Restore the comment to make it clear that .invalidate_range()
    callbacks may not sleep.

    Signed-off-by: Alistair Popple <apopple@nvidia.com>
    ---
    include/linux/mmu_notifier.h | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
    index 64a3e05..447d757 100644
    --- a/include/linux/mmu_notifier.h
    +++ b/include/linux/mmu_notifier.h
    @@ -200,6 +200,9 @@ struct mmu_notifier_ops {
    * external TLB range needs to be flushed. For more in depth
    * discussion on this see Documentation/mm/mmu_notifier.rst
    *
    + * The invalidate_range() function is called under the ptl
    + * spin-lock and not allowed to sleep.
    + *
    * Note that this function might be called with just a sub-range
    * of what was passed to invalidate_range_start()/end(), if
    * called between those functions.
    base-commit: 44c026a73be8038f03dbdeef028b642880cf1511
    --
    git-series 0.9.1

    \
     
     \ /
      Last update: 2023-05-24 03:48    [W:4.171 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site