linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: akpm@linux-foundation.org
Cc: mhocko@suse.cz, balbir@in.ibm.com, dave@linux.vnet.ibm.com,
	kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org
Subject: Re: + page_cgroup-reduce-allocation-overhead-for-page_cgroup-array-for-config_sparsemem.patch added to -mm tree
Date: Tue, 22 Mar 2011 10:24:21 +0100	[thread overview]
Message-ID: <20110322092421.GY2140@cmpxchg.org> (raw)
In-Reply-To: <201103090035.p290ZJ78004080@imap1.linux-foundation.org>

From: Johannes Weiner <hannes@cmpxchg.org>
Subject: [patch] mm: do not define unused free_page_cgroup without memory hotplug

Without memory hotplug configured in, the page cgroup array is never
actually freed again:

mm/page_cgroup.c:149:13: warning: a??free_page_cgroupa?? defined but not used

Wrap the definition in ifdefs.  Rather than moving it into an existing
ifdef section, to keep it close to its allocation counterpart.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/page_cgroup.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 885b2ac..a12cc3f 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -146,6 +146,7 @@ static void *__init_refok alloc_page_cgroup(size_t size, int nid)
 	return addr;
 }
 
+#ifdef CONFIG_MEMORY_HOTPLUG
 static void free_page_cgroup(void *addr)
 {
 	if (is_vmalloc_addr(addr)) {
@@ -159,6 +160,7 @@ static void free_page_cgroup(void *addr)
 		free_pages_exact(addr, table_size);
 	}
 }
+#endif
 
 static int __init_refok init_section_page_cgroup(unsigned long pfn)
 {
-- 
1.7.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/ .
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-03-22  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201103090035.p290ZJ78004080@imap1.linux-foundation.org>
2011-03-22  9:24 ` Johannes Weiner [this message]
2011-03-22  9:27   ` Michal Hocko

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=20110322092421.GY2140@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@in.ibm.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    /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