mm/memblock: print memblock_remove
authorMinchan Kim <minchan@kernel.org>
Fri, 8 Jun 2018 00:07:35 +0000 (17:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:36 +0000 (17:34 -0700)
memblock_remove report is useful to see why MemTotal of /proc/meminfo
between two kernels makes difference.

Link: http://lkml.kernel.org/r/20180508104223.8028-1-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memblock.c

index eec988c21c7e473da97c7e66e09244158ff3577d..93ad42bc8a73c0e6cb1f1e42847d44963c2510ec 100644 (file)
@@ -697,6 +697,11 @@ static int __init_memblock memblock_remove_range(struct memblock_type *type,
 
 int __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size)
 {
+       phys_addr_t end = base + size - 1;
+
+       memblock_dbg("memblock_remove: [%pa-%pa] %pS\n",
+                    &base, &end, (void *)_RET_IP_);
+
        return memblock_remove_range(&memblock.memory, base, size);
 }