[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] [PATCH] hostmem: Add clear option to file backend
From: |
Feiran Zheng |
Subject: |
Re: [External] [PATCH] hostmem: Add clear option to file backend |
Date: |
Thu, 2 Mar 2023 11:37:15 +0000 |
> On 2 Mar 2023, at 11:31, David Hildenbrand <david@redhat.com> wrote:
>
> On 02.03.23 12:09, Fam Zheng wrote:
>> This adds a memset to clear the backing memory. This is useful in the
>> case of PMEM DAX to drop dirty data, if the backing memory is handed
>> over from a previous application or firmware which didn't clean up
>> before exiting.
>
> Why can't the VM manager do that instead? If you have a file that's certainly
> easily possible.
Hi David,
Technically yes, but I have a simple VM manager here which wants to avoid
replicating the same mmap code, such as handling the flags depending on
share=on|off,hugepages=on|off. All in all this approach requires the least
additional code to achieve it.
Thanks,
Fam
>
> --
> Thanks,
>
> David / dhildenb
>
Re: [PATCH] hostmem: Add clear option to file backend, Daniel P . Berrangé, 2023/03/02