linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mm/vmacache: inline vmacache_valid_mm()
@ 2015-10-08  4:17 Davidlohr Bueso
  2015-10-08  6:21 ` Sergey Senozhatsky
  2015-10-08 22:15 ` Andrew Morton
  0 siblings, 2 replies; 7+ messages in thread
From: Davidlohr Bueso @ 2015-10-08  4:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Davidlohr Bueso, Davidlohr Bueso

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.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
 mm/vmacache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmacache.c b/mm/vmacache.c
index b6e3662..fd09dc9 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);
 }
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-08 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08  4:17 [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso
2015-10-08  6:21 ` Sergey Senozhatsky
2015-10-08 13:23   ` Davidlohr Bueso
2015-10-08 13:43     ` Sergey Senozhatsky
2015-10-08 16:55       ` Davidlohr Bueso
2015-10-08 17:32         ` Davidlohr Bueso
2015-10-08 22:15 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).