Commit a2c1aad3 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Linus Torvalds

mm/vmacache: inline vmacache_valid_mm()

This function incurs in very hot paths and merely does a few loads for
validity check.  Lets inline it, such that we can save the function call

(akpm: this is cosmetic - the compiler already inlines vmacache_valid_mm())
Signed-off-by: default avatarDavidlohr Bueso <>
Cc: Sergey Senozhatsky <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f7ae3a95
......@@ -52,7 +52,7 @@ void vmacache_flush_all(struct mm_struct *mm)
* Also handle the case where a kernel thread has adopted this mm via use_mm().
* That kernel thread's vmacache is not applicable to this mm.
static bool vmacache_valid_mm(struct mm_struct *mm)
static inline bool vmacache_valid_mm(struct mm_struct *mm)
return current->mm == mm && !(current->flags & PF_KTHREAD);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment