Re: [RFC PATCH 0/3] asynchronously scan and free empty user PTE pages

From: David Hildenbrand
Date: Mon Jun 17 2024 - 13:51:51 EST


On 14.06.24 05:32, Qi Zheng wrote:
Hi David,

How about starting with this:

a. for MADV_DONTNEED case, try synchronous reclaim as you said
b. for MADV_FREE case, add a madvise(MADV_PT_RECLAIM) option to mark
this vma, then add its corresponding mm to a global list, and then
traverse the list and reclaim it when the memory is tight and enters
the system reclaim path.

(If this option is for synchronous reclaim as you said, then the
user-mode program may need to start a thread to make a cyclic call.
I'm not sure if this usage makes sense. If so, I can also implement
such an option.)
c. for s390 case you mentioned, maybe we can set a CONFIG_FREE_PT first,
and then s390 will not select this config until the problem is solved.

CONFIG_PT_RECLAIM or sth. like that, that would depend on CONFIG_ARCH_SUPPORTS_PT_RECLAIM.

Then we can start with what we know works and was tested (e.g., x86).

--
Cheers,

David / dhildenb