diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2016-10-07 19:59:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-07 21:46:28 -0400 |
commit | 8907de5dc6e9d5925cf3b0a698cc3a4272fda073 (patch) | |
tree | 8fa6fca9d4bca76358f73044638e3f68fab4bbad /mm/memblock.c | |
parent | f6f34b4387d9e18304451a131b35d7c4f27a0b5a (diff) |
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@linux.vnet.ibm.com
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Suggested-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 483197ef613f..c8dfa430342b 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -1438,6 +1438,11 @@ phys_addr_t __init_memblock memblock_phys_mem_size(void) | |||
1438 | return memblock.memory.total_size; | 1438 | return memblock.memory.total_size; |
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | phys_addr_t __init_memblock memblock_reserved_size(void) | ||
1442 | { | ||
1443 | return memblock.reserved.total_size; | ||
1444 | } | ||
1445 | |||
1441 | phys_addr_t __init memblock_mem_size(unsigned long limit_pfn) | 1446 | phys_addr_t __init memblock_mem_size(unsigned long limit_pfn) |
1442 | { | 1447 | { |
1443 | unsigned long pages = 0; | 1448 | unsigned long pages = 0; |