On Wed, 7 Oct 2015 21:17:59 -0700 Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote: > 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. > > ... > > --- 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); > } Yeah, I'll ingest my headgear if there's any vaguely recent compiler which isn't already inlining this. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>