qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 02/12] softmmu/physmem: Fix ram_block_discard_range() to h


From: David Hildenbrand
Subject: Re: [PATCH v3 02/12] softmmu/physmem: Fix ram_block_discard_range() to handle shared anonymous memory
Date: Thu, 11 Mar 2021 22:49:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 11.03.21 22:37, Peter Xu wrote:
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.


If someone would be using it along with postcopy (which should work apart from that issue) you could be in trouble. That's why i think at least the Fixes: tag is valid. CC: stable might be debatable indeed.

Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>


Thanks!

--
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]