The patch titled Subject: mm/memblock.c: expose total reserved memory has been added to the -mm tree. Its filename is mm-memblock-expose-total-reserved-memory.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-memblock-expose-total-reserved-memory.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-memblock-expose-total-reserved-memory.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: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx> Subject: mm/memblock.c: expose total reserved memory The total reserved memory in a system is accounted but not available for use use outside mm/memblock.c. By exposing the total reserved memory, systems can better calculate the size of large hashes. Link: http://lkml.kernel.org/r/1472476010-4709-3-git-send-email-srikar@xxxxxxxxxxxxxxxxxx Signed-off-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx> Suggested-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxxxxxxx> Cc: Hari Bathini <hbathini@xxxxxxxxxxxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxx> Cc: Balbir Singh <bsingharora@xxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/memblock.h | 1 + mm/memblock.c | 5 +++++ 2 files changed, 6 insertions(+) diff -puN include/linux/memblock.h~mm-memblock-expose-total-reserved-memory include/linux/memblock.h --- a/include/linux/memblock.h~mm-memblock-expose-total-reserved-memory +++ a/include/linux/memblock.h @@ -328,6 +328,7 @@ phys_addr_t memblock_alloc_base(phys_add phys_addr_t __memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr); phys_addr_t memblock_phys_mem_size(void); +phys_addr_t memblock_reserved_size(void); phys_addr_t memblock_mem_size(unsigned long limit_pfn); phys_addr_t memblock_start_of_DRAM(void); phys_addr_t memblock_end_of_DRAM(void); diff -puN mm/memblock.c~mm-memblock-expose-total-reserved-memory mm/memblock.c --- a/mm/memblock.c~mm-memblock-expose-total-reserved-memory +++ a/mm/memblock.c @@ -1438,6 +1438,11 @@ phys_addr_t __init_memblock memblock_phy return memblock.memory.total_size; } +phys_addr_t __init_memblock memblock_reserved_size(void) +{ + return memblock.reserved.total_size; +} + phys_addr_t __init memblock_mem_size(unsigned long limit_pfn) { unsigned long pages = 0; _ Patches currently in -mm which might be from srikar@xxxxxxxxxxxxxxxxxx are mm-page_alloc-replace-set_dma_reserve-to-set_memory_reserve.patch fadump-register-the-memory-reserved-by-fadump.patch mm-introduce-arch_reserved_kernel_pages.patch mm-memblock-expose-total-reserved-memory.patch powerpc-implement-arch_reserved_kernel_pages.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