On Wed 17-05-17 19:56:35, Benjamin Herrenschmidt wrote: > On Wed, 2017-05-17 at 10:15 +0100, Mel Gorman wrote: [...] > > Fine -- hot add the memory from the device via a userspace trigger and > > have the userspace trigger then setup the policies to isolate CDM from > > general usage. > > This is racy though. The memory is hot added, but things can get > allocated all over it before it has time to adjust the policies. Same > issue we had with creating a CMA I believe. memory hotplug is by definition 2 stage. Physical hotadd which just prepares memory blocks and allocates struct pages and the memory online phase. You can handle the policy part from the userspace before onlining te first memblock from your CDM NUMA node. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>