Skip to content

Commit

Permalink
mm, mmu_notifier: be explicit about range invalition non-blocking mode
Browse files Browse the repository at this point in the history
If invalidate_range_start() is called for !blocking mode then all
callbacks have to guarantee they will no block/sleep.  The same obviously
applies to invalidate_range_end because this operation pairs with the
former and they are called from the same context.  Make sure this is
appropriately documented.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Reviewed-by: Jerome Glisse <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Michal Hocko authored and torvalds committed Oct 26, 2018
1 parent 15f570b commit 33490af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/mmu_notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ struct mmu_notifier_ops {
*
* If blockable argument is set to false then the callback cannot
* sleep and has to return with -EAGAIN. 0 should be returned
* otherwise.
* otherwise. Please note that if invalidate_range_start approves
* a non-blocking behavior then the same applies to
* invalidate_range_end.
*
*/
int (*invalidate_range_start)(struct mmu_notifier *mn,
Expand Down

0 comments on commit 33490af

Please sign in to comment.