[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20151008151557.0ea74baaafa753b7e86731d0@linux-foundation.org>
Date: Thu, 8 Oct 2015 15:15:57 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Davidlohr Bueso <dave@...olabs.net>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm()
On Wed, 7 Oct 2015 21:17:59 -0700 Davidlohr Bueso <dave@...olabs.net> 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists