All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] percpu: make pcpu_build_alloc_info() clear static buffers
@ 2009-09-24 12:55 Tejun Heo
  2009-09-24 12:56 ` [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2009-09-24 12:55 UTC (permalink / raw)
  To: Linux Kernel, David Miller, Rusty Russell, Christoph Lameter,
	Ingo Molnar, H. Peter Anvin

pcpu_build_alloc_info() may be called multiple times when percpu is
falling back to different first chunk allocator.  Make it clear static
buffers so that they don't contain values from previous runs.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
These three patches are scheduled for mainline and aim to work around
the cases where distance between the two farthest units is too large
compared to vmalloc area size.  This happens on sparc64 because
vmalloc area size is relatively small there and nodes can easily be
placed such that they are too far apart.

This patchset implements page mapping first chunk allocator for
sparc64 and make embedding allocator fallback to it when vmalloc area
doesn't seem large enough.  This should make percpu allocator more
robust on other archs which implement page mapping allocator (only x86
currently) and diagnosing problems easier on other archs.

Thanks.

 mm/percpu.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: work/mm/percpu.c
===================================================================
--- work.orig/mm/percpu.c
+++ work/mm/percpu.c
@@ -1347,6 +1347,10 @@ struct pcpu_alloc_info * __init pcpu_bui
 	struct pcpu_alloc_info *ai;
 	unsigned int *cpu_map;

+	/* this function may be called multiple times */
+	memset(group_map, 0, sizeof(group_map));
+	memset(group_cnt, 0, sizeof(group_map));
+
 	/*
 	 * Determine min_unit_size, alloc_size and max_upa such that
 	 * alloc_size is multiple of atom_size and is the smallest

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-29  0:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-24 12:55 [PATCH 1/3] percpu: make pcpu_build_alloc_info() clear static buffers Tejun Heo
2009-09-24 12:56 ` [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator Tejun Heo
2009-09-24 12:57   ` [PATCH 3/3] percpu: make embedding first chunk allocator check vmalloc space size Tejun Heo
2009-09-24 22:51   ` [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator David Miller
2009-09-28 21:36   ` David Miller
2009-09-29  0:14     ` Tejun Heo
2009-09-29  0:16       ` David Miller

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.