On Mon, Mar 08, 2021 at 04:05:50PM +0100, David Hildenbrand wrote:
We can create shared anonymous memory via
"-object memory-backend-ram,share=on,..."
which is, for example, required by PVRDMA for mremap() to work.
Shared anonymous memory is weird, though. Instead of MADV_DONTNEED, we
have to use MADV_REMOVE. MADV_DONTNEED fails silently and does nothing.
Fixes: 06329ccecfa0 ("mem: add share parameter to memory-backend-ram")
I'm thinking whether we should keep this fixes - it's valid, however it could
unveil issues if those remapped ranges didn't get unmapped in time. After all
"not releasing some memory existed" seems not a huge deal for stable. No
strong opinion, just raise it up as a pure question.