aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9f9623d690d6..eaa64d2ffdc5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -61,6 +61,7 @@
61#include <linux/migrate.h> 61#include <linux/migrate.h>
62#include <linux/hugetlb.h> 62#include <linux/hugetlb.h>
63#include <linux/sched/rt.h> 63#include <linux/sched/rt.h>
64#include <linux/sched/mm.h>
64#include <linux/page_owner.h> 65#include <linux/page_owner.h>
65#include <linux/kthread.h> 66#include <linux/kthread.h>
66#include <linux/memcontrol.h> 67#include <linux/memcontrol.h>
@@ -5925,7 +5926,7 @@ static unsigned long __paginginit calc_memmap_size(unsigned long spanned_pages,
5925 * the zone and SPARSEMEM is in use. If there are holes within the 5926 * the zone and SPARSEMEM is in use. If there are holes within the
5926 * zone, each populated memory region may cost us one or two extra 5927 * zone, each populated memory region may cost us one or two extra
5927 * memmap pages due to alignment because memmap pages for each 5928 * memmap pages due to alignment because memmap pages for each
5928 * populated regions may not naturally algined on page boundary. 5929 * populated regions may not be naturally aligned on page boundary.
5929 * So the (present_pages >> 4) heuristic is a tradeoff for that. 5930 * So the (present_pages >> 4) heuristic is a tradeoff for that.
5930 */ 5931 */
5931 if (spanned_pages > present_pages + (present_pages >> 4) && 5932 if (spanned_pages > present_pages + (present_pages >> 4) &&