All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET x86/mm] memblock, x86: Implement for_each_mem_pfn_range() and use it to improve memblock allocator
@ 2011-07-12  8:46 Tejun Heo
  2011-07-12  8:46 ` [PATCH 1/8] bootmem: Replace work_with_active_regions() with for_each_mem_pfn_range() Tejun Heo
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Tejun Heo @ 2011-07-12  8:46 UTC (permalink / raw)
  To: mingo, hpa, tglx, benh, yinghai, davem; +Cc: linux-kernel, linux-arch, x86

Hello,

Currently, page_alloc internal functions walk early_node_map[]
directly while external users can walk it with callback based
work_with_active_regions().

Callback based walking is awkward to use and iterating
early_node_map[] directly hinders scheduled move of node information
to memblock.  This patchset implements for_each_mem_pfn_range() which
is easier for and used by both internal and external users, and
provides indirection layer so that node memory information can be
moved elsewhere.

This patchset is composed of two parts.  The first half implements the
new iterator and converts all internal and external users other than
the ones which directly manipulate early_node_map[].

The second half uses the new iterator to improve memblock_nid_range(),
implement proper top-down memblock allocation and replaces x86
specific memblock allocator with it.

Most of the changes are in mm/page_alloc,memblock.c and under x86 but
there are small updates to sparc and powerpc.  They shouldn't change
any behavior but I've only compile tested them.

 0001-bootmem-Replace-work_with_active_regions-with-for_ea.patch
 0002-bootmem-Reimplement-__absent_pages_in_range-using-fo.patch
 0003-bootmem-Use-for_each_mem_pfn_range-in-page_alloc.c.patch
 0004-memblock-Improve-generic-memblock_nid_range-using-fo.patch
 0005-memblock-Don-t-allow-archs-to-override-memblock_nid_.patch
 0006-memblock-Make-memblock_alloc_-try_-nid-top-down.patch
 0007-memblock-Separate-out-memblock_find_in_range_node.patch
 0008-memblock-x86-Replace-memblock_x86_find_in_range_node.patch

0001 implements for_each_mem_pfn_range() and replaces
work_with_active_regions() with it.

0002-0003 apply for_each_mem_pfn_range() in page_alloc.c.

0004-0008 implement proper top-down allocation for memblock and
replace x86 specific memblock allocator with it.

This patchset is on top of

  x86/urgent (5da0ef9a85 "x86: Disable AMD_NUMA for 32bit for now")
+ pfn->nid granularity check patches [1]
+ "memblock, x86: Misc cleanups" patchset [2]

and available in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git review-x86-mm-iter

This patchset simplifies early_node_map[] walking and removes
duplicate x86 specific implementation and removes just shy of 200
lines.

 arch/powerpc/mm/numa.c          |   50 +-----
 arch/sparc/mm/init_64.c         |    4
 arch/x86/include/asm/memblock.h |    1
 arch/x86/mm/memblock.c          |   38 ----
 arch/x86/mm/numa.c              |    9 -
 drivers/pci/intel-iommu.c       |   24 +-
 include/linux/memblock.h        |    5
 include/linux/mm.h              |   24 ++
 mm/memblock.c                   |   90 ++++-------
 mm/nobootmem.c                  |    3
 mm/page_alloc.c                 |  326 +++++++++++-----------------------------
 11 files changed, 190 insertions(+), 384 deletions(-)

Thanks.

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/1166521
[2] http://thread.gmane.org/gmane.linux.kernel.cross-arch/10338

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

end of thread, other threads:[~2011-07-14 21:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12  8:46 [PATCHSET x86/mm] memblock, x86: Implement for_each_mem_pfn_range() and use it to improve memblock allocator Tejun Heo
2011-07-12  8:46 ` [PATCH 1/8] bootmem: Replace work_with_active_regions() with for_each_mem_pfn_range() Tejun Heo
2011-07-14  2:11   ` H. Peter Anvin
2011-07-14  7:44     ` Tejun Heo
2011-07-14  7:46   ` [PATCH UPDATED " Tejun Heo
2011-07-14 21:27     ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 2/8] bootmem: Reimplement __absent_pages_in_range() using for_each_mem_pfn_range() Tejun Heo
2011-07-14 21:28   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 3/8] bootmem: Use for_each_mem_pfn_range() in page_alloc.c Tejun Heo
2011-07-14 21:28   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 4/8] memblock: Improve generic memblock_nid_range() using for_each_mem_pfn_range() Tejun Heo
2011-07-14 21:29   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 5/8] memblock: Don't allow archs to override memblock_nid_range() Tejun Heo
2011-07-14 21:29   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 6/8] memblock: Make memblock_alloc_[try_]nid() top-down Tejun Heo
2011-07-14 21:30   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 7/8] memblock: Separate out memblock_find_in_range_node() Tejun Heo
2011-07-14 21:30   ` [tip:x86/memblock] " tip-bot for Tejun Heo
2011-07-12  8:46 ` [PATCH 8/8] memblock, x86: Replace memblock_x86_find_in_range_node() with generic memblock calls Tejun Heo
2011-07-14 21:31   ` [tip:x86/memblock] " tip-bot for Tejun Heo

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.