remarkable-linux/arch
Tejun Heo ce3141a277 percpu: drop pcpu_chunk->page[]
percpu core doesn't need to tack all the allocated pages.  It needs to
know whether certain pages are populated and a way to reverse map
address to page when freeing.  This patch drops pcpu_chunk->page[] and
use populated bitmap and vmalloc_to_page() lookup instead.  Using
vmalloc_to_page() exclusively is also possible but complicates first
chunk handling, inflates cache footprint and prevents non-standard
memory allocation for percpu memory.

pcpu_chunk->page[] was used to track each page's allocation and
allowed asymmetric population which happens during failure path;
however, with single bitmap for all units, this is no longer possible.
Bite the bullet and rewrite (de)populate functions so that things are
done in clearly separated steps such that asymmetric population
doesn't happen.  This makes the (de)population process much more
modular and will also ease implementing non-standard memory usage in
the future (e.g. large pages).

This makes @get_page_fn parameter to pcpu_setup_first_chunk()
unnecessary.  The parameter is dropped and all first chunk helpers are
updated accordingly.  Please note that despite the volume most changes
to first chunk helpers are symbol renames for variables which don't
need to be referenced outside of the helper anymore.

This change reduces memory usage and cache footprint of pcpu_chunk.
Now only #unit_pages bits are necessary per chunk.

[ Impact: reduced memory usage and cache footprint for bookkeeping ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
2009-07-04 08:11:00 +09:00
..
alpha alpha: fix percpu build breakage 2009-06-30 18:55:59 -07:00
arm Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
avr32 linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
blackfin Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
cris Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
frv Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
h8300 Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
ia64 Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
m32r linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
m68k linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
m68knommu linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
microblaze linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
mips Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
mn10300 Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
parisc linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
powerpc Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
s390 Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
sh Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
sparc percpu: drop pcpu_chunk->page[] 2009-07-04 08:11:00 +09:00
um Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
x86 x86,percpu: generalize lpage first chunk allocator 2009-07-04 08:10:59 +09:00
xtensa Merge branch 'master' into for-next 2009-07-04 07:13:18 +09:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00