qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset


From: David Hildenbrand
Subject: Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset
Date: Mon, 19 Dec 2022 10:01:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 19.12.22 02:21, Chenyi Qiang wrote:


On 12/16/2022 6:30 PM, David Hildenbrand wrote:
On 16.12.22 09:52, David Hildenbrand wrote:
On 16.12.22 07:22, Chenyi Qiang wrote:
vmem->bitmap indexes the memory region of the virtio-mem backend at a
granularity of block_size. To calculate the index of target section
offset,
the block_size should be divided instead of the bitmap_size.

I'm curious, what's the user-visible effect and how did you identify
this issue?

IIUC, we could end up our search for a plugged/unplugged block "too
late", such that we miss to process blocks.

That would be the case if the bitmap_size < block_size, which should
effectively always happen ...


unplug_all and migration would be affected, which is why a simple test
case without a guest reboot/migration wouldn't run into it.

I just realized that unplug_all is fine because only vfio implements the
ram_discard_listener so far and always sets
double_discard_supported=true. So migration should be the issue (and
IIRC migration with VFIO is still shaky).

Yes, actually, no obvious visible effect on my side. I was just learning
the RamDiscardManager interface and found this issue. :)

Good, thanks.

Queuing this to

https://github.com/davidhildenbrand/qemu.git mem-next

--
Thanks,

David / dhildenb




reply via email to

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