Re: [v2 PATCH 5/9] mm: vmscan: demote anon DRAM pages to PMEM node

Yang Shi
2019-04-15T22:10:13Z

On 4/11/19 7:31 AM, Dave Hansen wrote:
> On 4/10/19 8:56 PM, Yang Shi wrote:
>> include/linux/gfp.h | 12 ++++
>> include/linux/migrate.h | 1 +
>> include/trace/events/migrate.h | 3 +-
>> mm/debug.c | 1 +
>> mm/internal.h | 13 +++++
>> mm/migrate.c | 15 ++++-
>> mm/vmscan.c | 127 +++++++++++++++++++++++++++++++++++------
>> 7 files changed, 149 insertions(+), 23 deletions(-)
> Yikes, that's a lot of code.
>
> And it only handles anonymous pages?

Yes, for the time being. But, it is easy to extend to all kind of pages.

>
> Also, I don't see anything in the code tying this to strictly demote
> from DRAM to PMEM. Is that the end effect, or is it really implemented
> that way and I missed it?

No, not restrict to PMEM. It just tries to demote from "preferred node"
(or called compute node) to a memory-only node. In the hardware with
PMEM, PMEM would be the memory-only node.

Thanks,
Yang