Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242816

Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm()

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm()
Date 2015-10-09 00:20 +0200
Message-ID <qhrHA-8et-13@gated-at.bofh.it> (permalink)
References <qhaQp-Qf-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed,  7 Oct 2015 21:17:59 -0700 Davidlohr Bueso <dave@stgolabs.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 06:20 +0200
  Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-10-08 08:30 +0200
    Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 15:30 +0200
      Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-08 15:50 +0200
        Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 19:00 +0200
          Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 19:40 +0200
  Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Andrew Morton <akpm@linux-foundation.org> - 2015-10-09 00:20 +0200

csiph-web