linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vmalloc: remove #ifdef in function body
Date: Wed, 21 Dec 2011 15:22:32 +0900	[thread overview]
Message-ID: <20111221062232.GE28505@barrios-laptop.redhat.com> (raw)
In-Reply-To: <op.v6tsxbmb3l0zgt@mpn-glaptop>

On Wed, Dec 21, 2011 at 07:13:49AM +0100, Michal Nazarewicz wrote:
> On Wed, 21 Dec 2011 06:17:59 +0100, Minchan Kim <minchan@kernel.org> wrote:
> >We don't like function body which include #ifdef.
> >If we can, define null function to go out compile time.
> >It's trivial, no functional change.
> 
> It actually adds a??flush_tlb_kenel_range()a?? call to the function so there
> is functional change.

Sorry. I can't understand your point.
Why does it add flush_tlb_kernel_range in case of !CONFIG_DEBUG_PAGEALLOC?

> 
> >Signed-off-by: Minchan Kim <minchan@kernel.org>
> >---
> > mm/vmalloc.c |    9 +++++++--
> > 1 files changed, 7 insertions(+), 2 deletions(-)
> >
> >diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> >index 0aca3ce..e1fa5a6 100644
> >--- a/mm/vmalloc.c
> >+++ b/mm/vmalloc.c
> >@@ -505,6 +505,7 @@ static void unmap_vmap_area(struct vmap_area *va)
> > 	vunmap_page_range(va->va_start, va->va_end);
> > }
> >+#ifdef CONFIG_DEBUG_PAGEALLOC
> > static void vmap_debug_free_range(unsigned long start, unsigned long end)
> > {
> > 	/*
> >@@ -520,11 +521,15 @@ static void vmap_debug_free_range(unsigned long start, unsigned long end)
> > 	 * debugging doesn't do a broadcast TLB flush so it is a lot
> > 	 * faster).
> > 	 */
> >-#ifdef CONFIG_DEBUG_PAGEALLOC
> > 	vunmap_page_range(start, end);
> > 	flush_tlb_kernel_range(start, end);
> >-#endif
> > }
> >+#else
> >+static inline void vmap_debug_free_range(unsigned long start,
> >+					unsigned long end)
> >+{
> >+}
> >+#endif
> >/*
> >  * lazy_max_pages is the maximum amount of virtual address space we gather up
> 
> -- 
> Best regards,                                         _     _
> .o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
> ..o | Computer Science,  MichaA? a??mina86a?? Nazarewicz    (o o)
> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

-- 
Kind regards,
Minchan Kim

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-12-21  6:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21  5:17 Minchan Kim
2011-12-21  5:31 ` Joe Perches
2011-12-21  5:45   ` Minchan Kim
2011-12-21  5:58     ` Joe Perches
2011-12-21  6:07       ` Minchan Kim
2011-12-21  6:27         ` Joe Perches
2011-12-21  6:21       ` Michal Nazarewicz
2011-12-21  6:32         ` Joe Perches
2011-12-21  6:47           ` Michal Nazarewicz
2011-12-21 15:21             ` Ted Ts'o
2011-12-21  6:13 ` Michal Nazarewicz
2011-12-21  6:22   ` Minchan Kim [this message]
2011-12-21  6:24     ` Michal Nazarewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111221062232.GE28505@barrios-laptop.redhat.com \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mina86@mina86.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox