diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2015-11-05 21:48:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | a2c1aad3b5fccbb948878b75f9b8f13248666fd6 (patch) | |
tree | 0fcd7d2cdf6cf11521f0bb9667ff0cd9ef2350d1 | |
parent | f7ae3a95eab4e6766768cef664d2d429f53bd5f4 (diff) |
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 <dbueso@suse.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/vmacache.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
52 | * Also handle the case where a kernel thread has adopted this mm via use_mm(). | 52 | * Also handle the case where a kernel thread has adopted this mm via use_mm(). |
53 | * That kernel thread's vmacache is not applicable to this mm. | 53 | * That kernel thread's vmacache is not applicable to this mm. |
54 | */ | 54 | */ |
55 | static bool vmacache_valid_mm(struct mm_struct *mm) | 55 | static inline bool vmacache_valid_mm(struct mm_struct *mm) |
56 | { | 56 | { |
57 | return current->mm == mm && !(current->flags & PF_KTHREAD); | 57 | return current->mm == mm && !(current->flags & PF_KTHREAD); |
58 | } | 58 | } |