mm: cma: NUMA node interface

I've noticed that there is no interface exposed by CMA which would let
me to declare contigous memory on particular NUMA node.

This patchset adds the ability to try to allocate contiguous memory on a
specific node.  It will fallback to other nodes if the specified one
doesn't work.

Implement a new method for declaring contigous memory on particular node
and keep cma_declare_contiguous() as a wrapper.

[ build fix]
Signed-off-by: Aslan Bakirov <>
Signed-off-by: Roman Gushchin <>
Signed-off-by: Andrew Morton <>
Acked-by: Michal Hocko <>
Cc: Andreas Schaufler <>
Cc: Mike Kravetz <>
Cc: Rik van Riel <>
Cc: Joonsoo Kim <>
Signed-off-by: Linus Torvalds <>
4 files changed