Skip to content

Use lmb with x86

Yinghai Lu linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22lmb: Move lmb.c to mm/lib/Makefile mm/Makefile mm/lmb.c+2 -20 replies
2/22lmb: Seperate region array from lmb_region structinclude/linux/lmb.h mm/lmb.c+10 -20 replies
3/22lmb: Seperate __lmb_find_base() from __lmb_alloc_base()include/linux/lmb.h mm/lmb.c+18 -40 replies
4/22lmb: Add lmb_find_area()include/linux/lmb.h mm/lmb.c+52 -00 replies
5/22lmb: Add lmb_reserve_area/lmb_free_areainclude/linux/lmb.h mm/lmb.c+70 -04 replies
6/22bootmem, x86: Add weak version of reserve_bootmem_genericarch/x86/mm/init_32.c arch/x86/mm/init_64.c mm/bootmem.c+8 -240 replies
7/22lmb: Add lmb_to_bootmem()include/linux/lmb.h mm/lmb.c+34 -04 replies
8/22lmb: Add get_free_all_memory_range()include/linux/lmb.h mm/lmb.c+87 -12 replies
9/22lmb: Add lmb_register_active_regions() and lmb_hole_size()include/linux/lmb.h mm/lmb.c+72 -00 replies
10/22lmb: Prepare to include linux/lmb.h in core fileinclude/linux/lmb.h+3 -00 replies
11/22lmb: Add find_memory_core_early()include/linux/mm.h mm/page_alloc.c+31 -00 replies
12/22lmb: Add lmb_find_area_node()include/linux/lmb.h mm/lmb.c+16 -01 reply
13/22lmb: Add lmb_free_memory_size()include/linux/lmb.h mm/lmb.c+52 -01 reply
14/22lmb: Add lmb_memory_size()include/linux/lmb.h mm/lmb.c+18 -11 reply
15/22lmb: Add lmb_reserve_area_overlap_ok()include/linux/lmb.h mm/lmb.c+26 -21 reply
16/22lmb: Use lmb_debug to control debug message print outmm/lmb.c+21 -80 replies
17/22lmb: Add ARCH_DISCARD_LMB to put lmb code to .initinclude/linux/lmb.h mm/lmb.c+40 -221 reply
18/22lmb: Add __free/__reserve/__clear_lmb_reserved_region_array()mm/lmb.c+36 -271 reply
19/22x86, lmb: Add lmb_find_area_size()arch/x86/mm/Makefile arch/x86/mm/lmb.c+90 -00 replies
20/22x86: Use lmb to replace early_resarch/x86/Kconfig arch/x86/include/asm/e820.h arch/x86/include/asm/lmb.h +13 more+129 -1910 replies
21/22x86: Replace e820_/_early string with lmb_arch/x86/include/asm/efi.h arch/x86/kernel/acpi/sleep.c arch/x86/kernel/apic/numaq_32.c +17 more+87 -750 replies
22/22x86: Remove not used early_res codearch/x86/include/asm/e820.h arch/x86/kernel/e820.c include/linux/early_res.h +1 more+0 -6630 replies

Reviews trailers per patch

2 of 22 patches have a Reviewed-by or Acked-by.

PatchBenjamin Herrenschmidt
1/22A-b
2/22A-b
3/22
4/22
5/22
6/22
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -v14 00/22] Use lmb with x86

the new lmb could be used to replace early_res in x86.

Suggested by: David, Ben, and Thomas

-v6: change sequence as requested by Thomas
-v7: seperate them to more patches
-v8: add boundary checking to make sure not free partial page. -v9: use lmb_debug to control print out of reserve_lmb.
add e820 clean up, and e820 become __initdata
-v10:use lmb.rmo_size and ARCH_DISCARD_LMB according to Michael
change name to lmb_find_area/reserve_lmb_area/free_lmb_area,
according to Michael
update find_lmb_area to use __lmb_alloc_base according to ben
-v11:move find_lmb_area_size back to x86.
x86 has own find_lmb_area, and could be disabled by ARCH_LMB_FIND_AREA
because _lmb_find_base has different behavoir from x86's old one. one from high to high and one from low to high
need more test
tested for x86 32bit/64bit, numa/nonuma, nobootmem/bootmem.
-v12:refresh the series with current tip
seperate nobootmem.c, so could remove some #ifdef
still keep CONFIG_NO_BOOTMEM, in x86 .c, and could use the as tags so other lmb could refer them to use NO_BOOTMEM.

-v14:refresh to current tip

-v15:remove x86 version lmb_find_area
remove other nobootmem and x86 e820 from this patchset

Only first three patches in this set could affect original lmb users. lmb.c lines from 567 to 996
If lmb guys are still not happy, we could move that 360 lines to arch/x86/mm/lmb.c

still hope Ben could do lmb clean up on top of this patchset.

Thanks

Yinghai