All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET tip:x86/memblock] memblock: Kill early_node_map[], take 2
@ 2011-11-28 19:31 Tejun Heo
  2011-11-28 19:31 ` [PATCH 01/23] memblock: Fix include breakages caused by 24aa07882b Tejun Heo
                   ` (23 more replies)
  0 siblings, 24 replies; 34+ messages in thread
From: Tejun Heo @ 2011-11-28 19:31 UTC (permalink / raw)
  To: benh, yinghai, hpa, tony.luck, ralf, schwidefsky, liqin.chen,
	lethal, davem, linux-kernel, linux-arch, mingo, jonas, lennox.wu

Hello,

This patchset was posted quite a while ago but got lost during the
korg disturbance and I forgot about it too.  Thankfully, benh pinged
me about testing this patchset yesterday, so here's the refreshed
version.

Changes from the last take[L] are,

* Rebased on top of updated x86/memblock.

* Acked-by's added & updated patches folded into the series.

* 0001-memblock-Make-memblock_overlaps_region-static.patch:
  dropped as commit to make the same change is already upstream.
  (2d7d3eb2ba "mm/memblock.c: quiet sparse noise")

* 0001-memblock-Fix-include-breakages-caused-by-24aa07882b.patch:
  rolled into the series.  Also updated to handle openrisc.

* 0002-memblock-Make-memblock_-add-remove-free-reserve-retu.patch:
  trivial update to handle addition of memblock_end_of_DRAM
  
* 0005-memblock-Kill-sentinel-entries-at-the-end-of-static-.patch:
  updated to reflect POISON change by c9d8c3d089 "mm/memblock.c: avoid
  abuse of RED_INACTIVE"

* 0006-memblock-Kill-memblock_init.patch:
  updated to include openrisc

* 0013-memblock-s-memblock_analyze-memblock_allow_resize-an.patch:
  updated to include openrisc

This patchset builds on the previous "memblock, x86: Allow node info
in memblock and remove x86 specific memblock code" patchset[1], which
now is in tip:x86/memblock.  This patchset updates memblock so that
it's easier to use, converts all archs which use early_node_map[] to
use memblock instead, and kills early_node_map[].

Bootmem allocator is still looming there but this ensures a unified
way forward where memblock is the universal early memory management
mechanism.  This cleans up the entanglement between memblock and
early_node_map[] in the backend but API visible to archs is still a
bit confusing and can use some cleanup and documentation once things
settle down a bit.

x86, powerpc and sparc are boot tested in several different
configurations.  On x86 allmod/noconfigs are compile tested.  On all
other archs except for score, defconfig + some variations are compile
tested.

This does touch a lot of archs but except for x86 and powerpc the
changes are mostly trivial and as bulk of the changes involve updates
to generic memblock code, it would be great if these can be routed
through single tree (tip:x86/memblock).

 0001-memblock-Fix-include-breakages-caused-by-24aa07882b.patch
 0002-memblock-Make-memblock_-add-remove-free-reserve-retu.patch
 0003-memblock-Use-memblock_reserve-in-memblock-internal-f.patch
 0004-memblock-Add-__memblock_dump_all.patch
 0005-memblock-Kill-sentinel-entries-at-the-end-of-static-.patch
 0006-memblock-Kill-memblock_init.patch
 0007-memblock-Separate-out-memblock_isolate_range-from-me.patch
 0008-memblock-Reimplement-__memblock_remove-using-membloc.patch
 0009-memblock-Make-memblock-functions-handle-overflowing-.patch
 0010-memblock-Reimplement-memblock_enforce_memory_limit-u.patch
 0011-powerpc-Cleanup-memblock-usage.patch
 0012-memblock-Track-total-size-of-regions-automatically.patch
 0013-memblock-s-memblock_analyze-memblock_allow_resize-an.patch
 0014-memblock-Implement-memblock_add_node.patch
 0015-powerpc-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0016-sparc-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0017-SuperH-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0018-ia64-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0019-mips-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0020-s390-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0021-score-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0022-memblock-Kill-early_node_map.patch
 0023-memblock-Reimplement-memblock-allocation-using-rever.patch

0001-0014 clean up and improve generic memblock code (powerpc update
is to allow updates to generic code) so that it's easier for archs.
e.g. memblock_init/analyze() are no longer necessary.

0015-0017 convert archs which were using memblock + early_node_map[]
to use MEMBLOCK_HAVE_NODE_MAP.

0018-0021 convert archs which were using only early_node_map[] to
MEMBLOCK_HAVE_NODE_MAP.

0022 kills now unused early_node_map[].

0023 reimplements memblock allocator in sane way, which is possible
with early_node_map[] gone.

This patchset is available in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git memblock-kill-early_node_map

And diffstat follows.

 arch/arm/kernel/setup.c                  |    1 
 arch/arm/mm/init.c                       |    4 
 arch/ia64/Kconfig                        |    6 
 arch/ia64/mm/contig.c                    |    3 
 arch/ia64/mm/init.c                      |    4 
 arch/microblaze/include/asm/memblock.h   |   14 
 arch/microblaze/kernel/prom.c            |    3 
 arch/mips/Kconfig                        |    6 
 arch/mips/kernel/setup.c                 |    3 
 arch/mips/sgi-ip27/ip27-memory.c         |    5 
 arch/openrisc/include/asm/memblock.h     |   24 -
 arch/openrisc/kernel/prom.c              |    3 
 arch/powerpc/Kconfig                     |    4 
 arch/powerpc/include/asm/memblock.h      |    8 
 arch/powerpc/kernel/machine_kexec.c      |    3 
 arch/powerpc/kernel/prom.c               |   20 -
 arch/powerpc/mm/init_32.c                |    4 
 arch/powerpc/mm/mem.c                    |    2 
 arch/powerpc/mm/numa.c                   |   10 
 arch/powerpc/mm/tlb_nohash.c             |    1 
 arch/powerpc/platforms/embedded6xx/wii.c |   23 -
 arch/powerpc/platforms/ps3/mm.c          |    1 
 arch/s390/Kconfig                        |    6 
 arch/s390/kernel/setup.c                 |    4 
 arch/score/Kconfig                       |   12 
 arch/score/kernel/setup.c                |    4 
 arch/sh/Kconfig                          |    1 
 arch/sh/include/asm/memblock.h           |    4 
 arch/sh/kernel/machine_kexec.c           |    3 
 arch/sh/kernel/setup.c                   |    3 
 arch/sh/mm/Kconfig                       |    3 
 arch/sh/mm/init.c                        |    3 
 arch/sparc/Kconfig                       |    4 
 arch/sparc/include/asm/memblock.h        |    8 
 arch/sparc/mm/init_64.c                  |   28 -
 arch/unicore32/kernel/setup.c            |    1 
 arch/unicore32/mm/init.c                 |    4 
 arch/unicore32/mm/mmu.c                  |    1 
 arch/x86/Kconfig                         |    3 
 arch/x86/kernel/e820.c                   |    3 
 arch/x86/kernel/head32.c                 |    2 
 arch/x86/kernel/head64.c                 |    2 
 arch/x86/xen/enlighten.c                 |    2 
 drivers/iommu/intel-iommu.c              |    1 
 include/linux/memblock.h                 |  116 +++--
 include/linux/mm.h                       |   50 --
 include/linux/mmzone.h                   |    8 
 include/linux/poison.h                   |    6 
 mm/memblock.c                            |  603 ++++++++++++++-----------------
 mm/page_alloc.c                          |  259 -------------
 50 files changed, 455 insertions(+), 841 deletions(-)

--
tejun

[L] http://thread.gmane.org/gmane.linux.kernel.cross-arch/10464
[1] https://lkml.org/lkml/2011/7/12/95

^ permalink raw reply	[flat|nested] 34+ messages in thread
* [PATCHSET tip:x86/memblock] memblock: Kill early_node_map[]
@ 2011-07-26 15:35 Tejun Heo
  2011-07-26 15:35   ` Tejun Heo
  0 siblings, 1 reply; 34+ messages in thread
From: Tejun Heo @ 2011-07-26 15:35 UTC (permalink / raw)
  To: benh, yinghai, hpa, tony.luck, ralf, schwidefsky, liqin.chen,
	lethal, davem, linux-kernel, linux-arch
  Cc: mingo

Hello,

This patchset builds on the previous "memblock, x86: Allow node info
in memblock and remove x86 specific memblock code" patchset, which now
is in tip:x86/memblock.  This patchset updates memblock so that it's
easier to use, converts all archs which use early_node_map[] to use
memblock instead, and kills early_node_map[].

Bootmem allocator is still looming there but this ensures a unified
way forward where memblock is the universal early memory management
mechanism.  This cleans up the entanglement between memblock and
early_node_map[] in the backend but API visible to archs is still a
bit confusing and can use some cleanup and documentation once things
settle down a bit.

x86, powerpc and sparc are boot tested in several different
configurations.  On x86 allmod/noconfigs are compile tested.  On all
other archs except for score, defconfig + some variations are compile
tested.

This does touch a lot of archs but except for x86 and powerpc the
changes are mostly trivial and as bulk of the changes involve updates
to generic memblock code, it would be great if these can be routed
through single tree (tip:x86/memblock).

David, Ben, Paul, patches 0015-0017 are identical sans some offsets to
the previously posted versions.

 0001-memblock-Make-memblock_overlaps_region-static.patch
 0002-memblock-Make-memblock_-add-remove-free-reserve-retu.patch
 0003-memblock-Use-memblock_reserve-in-memblock-internal-f.patch
 0004-memblock-Add-__memblock_dump_all.patch
 0005-memblock-Kill-sentinel-entries-at-the-end-of-static-.patch
 0006-memblock-Kill-memblock_init.patch
 0007-memblock-Separate-out-memblock_isolate_range-from-me.patch
 0008-memblock-Reimplement-__memblock_remove-using-membloc.patch
 0009-memblock-Make-memblock-functions-handle-overflowing-.patch
 0010-memblock-Reimplement-memblock_enforce_memory_limit-u.patch
 0011-powerpc-Cleanup-memblock-usage.patch
 0012-memblock-Track-total-size-of-regions-automatically.patch
 0013-memblock-s-memblock_analyze-memblock_allow_resize-an.patch
 0014-memblock-Implement-memblock_add_node.patch
 0015-powerpc-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0016-sparc-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0017-SuperH-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0018-ia64-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0019-mips-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0020-s390-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0021-score-Use-HAVE_MEMBLOCK_NODE_MAP.patch
 0022-memblock-Kill-early_node_map.patch
 0023-memblock-Reimplement-memblock-allocation-using-rever.patch

0001-0014 clean up and improve generic memblock code (powerpc update
is to allow updates to generic code) so that it's easier for archs.
e.g. memblock_init/analyze() are no longer necessary.

0015-0017 convert archs which were using memblock + early_node_map[]
to use MEMBLOCK_HAVE_NODE_MAP.

0018-0021 convert archs which were using only early_node_map[] to
MEMBLOCK_HAVE_NODE_MAP.

0022 kills now unused early_node_map[].

0023 reimplements memblock allocator in sane way, which is possible
with early_node_map[] gone.

This patchset is available in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git memblock

And diffstat follows.

 arch/arm/mm/init.c                       |    3
 arch/ia64/Kconfig                        |    6
 arch/ia64/mm/contig.c                    |    3
 arch/ia64/mm/init.c                      |    4
 arch/microblaze/kernel/prom.c            |    3
 arch/mips/Kconfig                        |    6
 arch/mips/kernel/setup.c                 |    3
 arch/mips/sgi-ip27/ip27-memory.c         |    5
 arch/powerpc/Kconfig                     |    4
 arch/powerpc/kernel/machine_kexec.c      |    3
 arch/powerpc/kernel/prom.c               |   20 -
 arch/powerpc/mm/init_32.c                |    4
 arch/powerpc/mm/mem.c                    |    2
 arch/powerpc/mm/numa.c                   |   10
 arch/powerpc/mm/tlb_nohash.c             |    1
 arch/powerpc/platforms/embedded6xx/wii.c |   23 -
 arch/powerpc/platforms/ps3/mm.c          |    1
 arch/s390/Kconfig                        |    6
 arch/s390/kernel/setup.c                 |    4
 arch/score/Kconfig                       |   12
 arch/score/kernel/setup.c                |    4
 arch/sh/Kconfig                          |    1
 arch/sh/kernel/machine_kexec.c           |    3
 arch/sh/kernel/setup.c                   |    3
 arch/sh/mm/Kconfig                       |    3
 arch/sh/mm/init.c                        |    3
 arch/sparc/Kconfig                       |    2
 arch/sparc/mm/init_64.c                  |   28 -
 arch/unicore32/mm/init.c                 |    3
 arch/x86/Kconfig                         |    3
 arch/x86/kernel/e820.c                   |    3
 arch/x86/kernel/head32.c                 |    2
 arch/x86/kernel/head64.c                 |    2
 arch/x86/xen/enlighten.c                 |    2
 drivers/pci/intel-iommu.c                |    1
 include/linux/memblock.h                 |  114 +++--
 include/linux/mm.h                       |   50 --
 include/linux/mmzone.h                   |    8
 mm/memblock.c                            |  606 ++++++++++++++-----------------
 mm/page_alloc.c                          |  259 -------------
 40 files changed, 450 insertions(+), 773 deletions(-)

Thanks.

--
tejun

[1] https://lkml.org/lkml/2011/7/12/95

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

end of thread, other threads:[~2011-12-08 16:24 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28 19:31 [PATCHSET tip:x86/memblock] memblock: Kill early_node_map[], take 2 Tejun Heo
2011-11-28 19:31 ` [PATCH 01/23] memblock: Fix include breakages caused by 24aa07882b Tejun Heo
2011-11-28 19:31 ` [PATCH 02/23] memblock: Make memblock_{add|remove|free|reserve}() return int and update prototypes Tejun Heo
2011-11-28 19:31 ` [PATCH 03/23] memblock: Use memblock_reserve() in memblock internal functions Tejun Heo
2011-11-28 19:31 ` [PATCH 04/23] memblock: Add __memblock_dump_all() Tejun Heo
2011-11-28 19:31 ` [PATCH 05/23] memblock: Kill sentinel entries at the end of static region arrays Tejun Heo
2011-11-28 19:31 ` [PATCH 06/23] memblock: Kill memblock_init() Tejun Heo
2011-11-28 19:31 ` [PATCH 07/23] memblock: Separate out memblock_isolate_range() from memblock_set_node() Tejun Heo
2011-11-28 19:31 ` [PATCH 08/23] memblock: Reimplement __memblock_remove() using memblock_isolate_range() Tejun Heo
2011-11-28 19:31 ` [PATCH 09/23] memblock: Make memblock functions handle overflowing range @size Tejun Heo
2011-11-28 19:31 ` [PATCH 10/23] memblock: Reimplement memblock_enforce_memory_limit() using __memblock_remove() Tejun Heo
2011-11-28 19:31 ` [PATCH 11/23] powerpc: Cleanup memblock usage Tejun Heo
2011-11-28 19:31 ` [PATCH 12/23] memblock: Track total size of regions automatically Tejun Heo
2011-11-28 19:31 ` [PATCH 13/23] memblock: s/memblock_analyze()/memblock_allow_resize()/ and update users Tejun Heo
2011-11-28 19:31 ` [PATCH 14/23] memblock: Implement memblock_add_node() Tejun Heo
2011-11-28 19:31 ` [PATCH 15/23] powerpc: Use HAVE_MEMBLOCK_NODE_MAP Tejun Heo
2011-11-28 19:31 ` [PATCH 16/23] sparc: " Tejun Heo
2011-11-28 19:31   ` Tejun Heo
2011-11-28 19:31 ` [PATCH 17/23] SuperH: " Tejun Heo
2011-11-28 19:31   ` Tejun Heo
2011-11-28 19:31 ` [PATCH 18/23] ia64: " Tejun Heo
2011-11-28 19:31   ` Tejun Heo
2011-11-28 19:31 ` [PATCH 19/23] mips: " Tejun Heo
2011-12-08 16:19   ` Ralf Baechle
2011-11-28 19:31 ` [PATCH 20/23] s390: " Tejun Heo
2011-11-28 19:31 ` [PATCH 21/23] score: " Tejun Heo
2011-11-28 19:31 ` [PATCH 22/23] memblock: Kill early_node_map[] Tejun Heo
2011-11-28 19:31 ` [PATCH 23/23] memblock: Reimplement memblock allocation using reverse free area iterator Tejun Heo
2011-12-05 16:31 ` [PATCHSET tip:x86/memblock] memblock: Kill early_node_map[], take 2 Ingo Molnar
2011-12-05 17:12   ` Tejun Heo
2011-12-05 17:26     ` Ingo Molnar
2011-12-05 20:26   ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2011-07-26 15:35 [PATCHSET tip:x86/memblock] memblock: Kill early_node_map[] Tejun Heo
2011-07-26 15:35 ` [PATCH 11/23] powerpc: Cleanup memblock usage Tejun Heo
2011-07-26 15:35   ` 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.