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 Latest39 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/39swiotlb: Use page alignment for early buffer allocationlib/swiotlb.c+8 -80 replies
2/39x86: Add sanitize_e820_map()arch/x86/include/asm/e820.h arch/x86/kernel/e820.c arch/x86/kernel/efi.c +2 more+27 -200 replies
3/39x86: Align e820 ram range to pagearch/x86/kernel/e820.c+44 -00 replies
4/39lmb: Move lmb.c to mm/lib/Makefile mm/Makefile mm/lmb.c+2 -21 reply
5/39lmb: Seperate region array from lmb_region structinclude/linux/lmb.h mm/lmb.c+10 -21 reply
6/39lmb: Seperate __lmb_find_base() from __lmb_alloc_base()mm/lmb.c+17 -42 replies
7/39lmb: Add lmb_find_area()include/linux/lmb.h mm/lmb.c+53 -06 replies
8/39lmb: Add lmb_reserve_area/lmb_free_areainclude/linux/lmb.h mm/lmb.c+70 -01 reply
9/39bootmem, 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
10/39lmb: Add lmb_to_bootmem()include/linux/lmb.h mm/lmb.c+34 -00 replies
11/39lmb: Add get_free_all_memory_range()include/linux/lmb.h mm/lmb.c+87 -10 replies
12/39lmb: Add lmb_register_active_regions() and lmb_hole_size()include/linux/lmb.h mm/lmb.c+72 -00 replies
13/39lmb: Prepare to include linux/lmb.h in core fileinclude/linux/lmb.h+3 -00 replies
14/39lmb: Add find_memory_core_early()include/linux/mm.h mm/page_alloc.c+31 -00 replies
15/39lmb: Add lmb_find_area_node()include/linux/lmb.h mm/lmb.c+16 -02 replies
16/39lmb: Add lmb_free_memory_size()include/linux/lmb.h mm/lmb.c+52 -00 replies
17/39lmb: Add lmb_memory_size()include/linux/lmb.h mm/lmb.c+18 -10 replies
18/39lmb: Add lmb_reserve_area_overlap_ok()include/linux/lmb.h mm/lmb.c+26 -24 replies
19/39lmb: Use lmb_debug to control debug message print outmm/lmb.c+21 -80 replies
20/39lmb: Add ARCH_DISCARD_LMB to put lmb code to .initinclude/linux/lmb.h mm/lmb.c+40 -220 replies
21/39lmb: Add __free/__reserve/__clear_lmb_reserved_region_array()mm/lmb.c+36 -270 replies
22/39x86, lmb: Add lmb_find_area_size()arch/x86/mm/Makefile arch/x86/mm/lmb.c+90 -00 replies
23/39x86, lmb: Add x86 version of __lmb_find_area()arch/x86/Kconfig arch/x86/mm/lmb.c+86 -00 replies
24/39x86: Use lmb to replace early_resarch/x86/Kconfig arch/x86/include/asm/e820.h arch/x86/include/asm/lmb.h +13 more+127 -1920 replies
25/39x86: 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
26/39nobootmem: use lmb.default_alloc_limit in alloc_bootmem pathmm/page_alloc.c+3 -04 replies
27/39x86, lmb: turn off ARCH_LMB_FIND_AREAarch/x86/Kconfig+1 -10 replies
28/39x86: 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
29/39x86, lmb: Use lmb_memory_size()/lmb_free_memory_size() to get correct dma_reservearch/x86/include/asm/e820.h arch/x86/kernel/e820.c arch/x86/kernel/setup.c +1 more+20 -70 replies
30/39x86: put 64 bit numa node memmap above 16March/x86/mm/numa_64.c arch/x86/mm/srat_64.c+3 -30 replies
31/39x86: Use wake_system_ram_range() instead of e820_any_mapped() in agp patharch/x86/include/asm/gart.h arch/x86/kernel/aperture_64.c drivers/char/agp/amd64-agp.c+60 -230 replies
32/39x86: Add get_centaur_ram_top()arch/x86/include/asm/e820.h arch/x86/kernel/cpu/centaur.c arch/x86/kernel/e820.c +1 more+69 -510 replies
33/39x86: Change e820_any_mapped() to __initarch/x86/kernel/e820.c+3 -30 replies
34/39x86: Use walk_system_ream_range() instead of referring e820.map directly for tbootarch/x86/kernel/tboot.c+9 -130 replies
35/39x86: make e820 to be __initdataarch/x86/include/asm/e820.h arch/x86/kernel/e820.c+1 -30 replies
36/39bootmem: Add nobootmem.c to reduce the #ifdefmm/Makefile mm/bootmem.c mm/nobootmem.c+397 -1510 replies
37/39mm: move contig_page_data define to bootmem.c/nobootmem.cmm/bootmem.c mm/nobootmem.c mm/page_alloc.c+12 -90 replies
38/39lmb: move __alloc_memory_core_early() to nobootmem.cinclude/linux/mm.h mm/nobootmem.c mm/page_alloc.c+21 -260 replies
39/39x86: have nobootmem version setup_bootmem_allocator()arch/x86/mm/init_32.c+10 -50 replies

Reviews trailers per patch

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

PatchBenjamin Herrenschmidt
1/39
2/39
3/39
4/39A-b
5/39A-b
6/39
7/39
8/39
9/39
10/39
11/39
12/39
13/39
14/39
15/39
16/39
17/39
18/39
19/39
20/39
21/39
22/39
23/39
24/39
25/39
26/39
27/39
28/39
29/39
30/39
31/39
32/39
33/39
34/39
35/39
36/39
37/39
38/39
39/39

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 -v12 00/39] use lmb with x86

the new lmb could be used to 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.

still keep find_lmb_area, may replace those find_lmb_area will lmb_alloc, if everything go fine

Please put them into tip and -next to have more test coverage.

Thanks

Yinghai