All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@kernel.dk>
Subject: [PATCH RESEND 1/3] vmalloc: pcpu_get/free_vm_areas() aren't needed on UP
Date: Fri, 03 Sep 2010 18:27:53 +0200	[thread overview]
Message-ID: <4C812209.1040707@kernel.org> (raw)
In-Reply-To: <4C762734.1030402@kernel.org>

These functions are used only by percpu memory allocator on SMP.
Don't build them on UP.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Nick Piggin <npiggin@kernel.dk>
---
(resending w/ Nick's new email address)

So, something like these three patches.  Also available in the
following git tree.

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git review-up

Nick, can I route this one through percpu tree?

Thanks.

 include/linux/vmalloc.h |    2 ++
 mm/vmalloc.c            |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index de05e96..3d510e8 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -115,10 +115,12 @@ extern rwlock_t vmlist_lock;
 extern struct vm_struct *vmlist;
 extern __init void vm_area_register_early(struct vm_struct *vm, size_t align);

+#ifdef CONFIG_SMP
 struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
 				     const size_t *sizes, int nr_vms,
 				     size_t align, gfp_t gfp_mask);

 void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
+#endif

 #endif /* _LINUX_VMALLOC_H */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index b7e314b..eb57a63 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2052,6 +2052,7 @@ void free_vm_area(struct vm_struct *area)
 }
 EXPORT_SYMBOL_GPL(free_vm_area);

+#ifdef CONFIG_SMP
 static struct vmap_area *node_to_va(struct rb_node *n)
 {
 	return n ? rb_entry(n, struct vmap_area, rb_node) : NULL;
@@ -2332,6 +2333,7 @@ void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms)
 		free_vm_area(vms[i]);
 	kfree(vms);
 }
+#endif	/* CONFIG_SMP */

 #ifdef CONFIG_PROC_FS
 static void *s_start(struct seq_file *m, loff_t *pos)
-- 
1.7.1

  parent reply	other threads:[~2010-09-03 16:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  2:07 linux-next: build failure after merge of the final tree (slab tree related) Stephen Rothwell
2010-08-24 17:41 ` Pekka Enberg
2010-08-24 17:59   ` Christoph Lameter
2010-08-24 18:32     ` Pekka Enberg
2010-08-24 18:53       ` Christoph Lameter
2010-08-25  8:18         ` Tejun Heo
2010-08-25  8:57           ` Pekka Enberg
2010-08-25 13:50             ` Christoph Lameter
2010-08-26  8:35               ` Tejun Heo
2010-09-03 16:25                 ` [PATCH 1/3] vmalloc: pcpu_get/free_vm_areas() aren't needed on UP Tejun Heo
2010-09-03 17:16                   ` Christoph Lameter
2010-09-03 16:26                 ` [PATCH 2/3] percpu: reduce PCPU_MIN_UNIT_SIZE to 32k Tejun Heo
2010-09-03 17:18                   ` Christoph Lameter
2010-09-03 16:26                 ` [PATCH 3/3] percpu: use percpu allocator on UP too Tejun Heo
2010-09-03 18:43                   ` Christoph Lameter
2010-09-04  6:54                   ` Pekka Enberg
2010-09-04  9:47                     ` Tejun Heo
2010-09-08  9:17                       ` Tejun Heo
2010-09-10 14:59                         ` Tejun Heo
2010-09-18 17:47                           ` Pekka Enberg
2010-09-03 16:27                 ` Tejun Heo [this message]
2010-08-25 20:12           ` linux-next: build failure after merge of the final tree (slab tree related) Christoph Lameter
2010-08-25 21:37             ` Christoph Lameter
2010-08-25  0:13   ` Stephen Rothwell
2010-08-25  4:46     ` Pekka Enberg
2010-08-25 14:07       ` Christoph Lameter
2010-08-26  0:01         ` David Rientjes
2010-08-26  1:35           ` Christoph Lameter
2010-08-26  3:16             ` David Rientjes
2010-08-26 14:41               ` Christoph Lameter
2010-08-26 18:16                 ` Pekka Enberg

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=4C812209.1040707@kernel.org \
    --to=tj@kernel.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    --cc=penberg@cs.helsinki.fi \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.