Subject: + memblock-dont-align-size-silent-in-memblock_virt_alloc.patch added to -mm tree To: yinghai@xxxxxxxxxx,dave.hansen@xxxxxxxxx,hpa@xxxxxxxxx,konrad.wilk@xxxxxxxxxx,linux@xxxxxxxxxxxxxxxx,mingo@xxxxxxx,santosh.shilimkar@xxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 24 Jan 2014 11:55:41 -0800 The patch titled Subject: memblock: don't align size silent in memblock_virt_alloc() has been added to the -mm tree. Its filename is memblock-dont-align-size-silent-in-memblock_virt_alloc.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/memblock-dont-align-size-silent-in-memblock_virt_alloc.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/memblock-dont-align-size-silent-in-memblock_virt_alloc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yinghai Lu <yinghai@xxxxxxxxxx> Subject: memblock: don't align size silent in memblock_virt_alloc() In original __alloc_memory_core_early() for bootmem wrapper, we do not align size silently. We should not do that, as later free with old size will leave some range not freed. It's obvious that code is copied from memblock_base_nid(), and that code is wrong for the same reason. Also remove that in memblock_alloc_base. Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx> Acked-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memblock.c | 6 ------ 1 file changed, 6 deletions(-) diff -puN mm/memblock.c~memblock-dont-align-size-silent-in-memblock_virt_alloc mm/memblock.c --- a/mm/memblock.c~memblock-dont-align-size-silent-in-memblock_virt_alloc +++ a/mm/memblock.c @@ -984,9 +984,6 @@ static phys_addr_t __init memblock_alloc if (!align) align = SMP_CACHE_BYTES; - /* align @size to avoid excessive fragmentation on reserved array */ - size = round_up(size, align); - found = memblock_find_in_range_node(size, align, 0, max_addr, nid); if (found && !memblock_reserve(found, size)) return found; @@ -1080,9 +1077,6 @@ static void * __init memblock_virt_alloc if (!align) align = SMP_CACHE_BYTES; - /* align @size to avoid excessive fragmentation on reserved array */ - size = round_up(size, align); - again: alloc = memblock_find_in_range_node(size, align, min_addr, max_addr, nid); _ Patches currently in -mm which might be from yinghai@xxxxxxxxxx are origin.patch memblock-nobootmem-add-memblock_virt_alloc_low.patch x86-revert-wrong-memblock-current-limit-setting.patch memblock-dont-align-size-silent-in-memblock_virt_alloc.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html