qemu-devel
[Top][All Lists]
Advanced

[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:48:48 +0000


> On 2 Mar 2023, at 11:39, David Hildenbrand <david@redhat.com> wrote:
> 
> On 02.03.23 12:37, Feiran Zheng wrote:
>>> 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.
> 
> so ... we're supposed to maintain that code in QEMU instead to make your life 
> easier ? :)
> 
> Sorry, for this particular use case I don't see the big benefit of moving 
> that code into QEMU.
> 

I am posting because this does not only makes my life easier, supposedly it 
also make other developers life easier, because the file here can be a char 
file and there is no easy way to clear it (/dev/dax1.0) from command line if 
you want to invoke a QEMU command directly.

Maybe I’m missing a convenient command to clear a DAX char file?

Surely it doesn’t make a big difference either way and I am not worried of 
maintaining the code outside QEMU, but I just think this flag is a nice thing 
in QEMU anyway.



Fam

> -- 
> Thanks,
> 
> David / dhildenb
> 




reply via email to

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