public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] x86, percpu: implement and use reserved percpu alloc
@ 2009-03-06  6:46 Tejun Heo
  2009-03-06  6:46 ` [PATCH 1/8] percpu: clean up percpu constants Tejun Heo
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Tejun Heo @ 2009-03-06  6:46 UTC (permalink / raw)
  To: mingo, rusty, tglx, x86, linux-kernel, hpa, efault, jaswinder,
	cooloney


Hello,

Please pull from the following git vector.

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

This patchset implements reserved percpu alloc from the first chunk
and uses it for static perpcu variables in modules on x86_64.  This is
necessary because x86_64 expects symbols to be relocatable using 32bit
relocations but dynamic percpu allocation does not guarantee it
leading to relocation overflow during module load.

This can happen to any of the x86_64 percpu first chunk allocators but
the embedding allocator is most likely to trigger it as the first
chunk is located in the normal kernel memory allocation area while all
the other chunks will be allocated in the vmalloc area which is very
far from the first chunk.

This type of reservation will be necessary for other architectures too
where addressing mode used for percpu acess uses offsets with limited
range to access symbols (e.g. ia64 w/ the magic 64k percpu page).

This problem was first reported and bisected by Mike Galbraith[2].

This patchset is against the current x86/core/percpu[1] and contains
the following patches.

 0001-percpu-clean-up-percpu-constants.patch
 0002-percpu-cosmetic-renames-in-pcpu_setup_first_chunk.patch
 0003-percpu-improve-first-chunk-initial-area-map-handlin.patch
 0004-percpu-use-negative-for-auto-for-pcpu_setup_first_c.patch
 0005-x86-make-embedding-percpu-allocator-return-excessiv.patch
 0006-percpu-add-an-indirection-ptr-for-chunk-page-map-ac.patch
 0007-percpu-module-implement-reserved-allocation-and-us.patch
 0008-x86-percpu-setup-reserved-percpu-area-for-x86_64.patch

0001-0004 makes misc updates to percpu in preparation of later
changes.  0005 fixes a case where excessive memory can be set aside in
the first chunk when using the embedding allocator.  0006-0008
implement reserved allocation and use it for x86_64.

Bryan Wu, can you please review #0001?  It contains small change in
blackfin.  It's mostly trivial but just in case.

Diffstat follows.

 arch/blackfin/include/asm/percpu.h |   10 -
 arch/x86/kernel/setup_percpu.c     |   73 +++++++---
 include/linux/percpu.h             |   60 +++-----
 kernel/module.c                    |    2 
 mm/percpu.c                        |  267 ++++++++++++++++++++++++++-----------
 5 files changed, 274 insertions(+), 138 deletions(-)

Thanks.

--
tejun

[1] f254f3909efaf59ca2d0f408de2d044dace60706
[2] http://thread.gmane.org/gmane.linux.kernel/801799

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

end of thread, other threads:[~2009-03-08  5:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06  6:46 [GIT PULL] x86, percpu: implement and use reserved percpu alloc Tejun Heo
2009-03-06  6:46 ` [PATCH 1/8] percpu: clean up percpu constants Tejun Heo
2009-03-08  5:01   ` Bryan Wu
2009-03-06  6:46 ` [PATCH 2/8] percpu: cosmetic renames in pcpu_setup_first_chunk() Tejun Heo
2009-03-06  6:46 ` [PATCH 3/8] percpu: improve first chunk initial area map handling Tejun Heo
2009-03-06  6:46 ` [PATCH 4/8] percpu: use negative for auto for pcpu_setup_first_chunk() arguments Tejun Heo
2009-03-06  6:46 ` [PATCH 5/8] x86: make embedding percpu allocator return excessive free space Tejun Heo
2009-03-06  6:46 ` [PATCH 6/8] percpu: add an indirection ptr for chunk page map access Tejun Heo
2009-03-06  6:46 ` [PATCH 7/8] percpu, module: implement reserved allocation and use it for module percpu variables Tejun Heo
2009-03-06  6:46 ` [PATCH 8/8] x86, percpu: setup reserved percpu area for x86_64 Tejun Heo
2009-03-06  7:29 ` [GIT PULL] x86, percpu: implement and use reserved percpu alloc Mike Galbraith
2009-03-06  8:06 ` Ingo Molnar
2009-03-08  4:37 ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox