From a2c1aad3b5fccbb948878b75f9b8f13248666fd6 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Thu, 5 Nov 2015 18:48:52 -0800 Subject: 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 overhead. (akpm: this is cosmetic - the compiler already inlines vmacache_valid_mm()) Signed-off-by: Davidlohr Bueso Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/vmacache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmacache.c b/mm/vmacache.c index b6e3662fe339..fd09dc9c6812 100644 --- a/mm/vmacache.c +++ b/mm/vmacache.c @@ -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); } -- cgit v1.2.3