From: David Hildenbrand <david@redhat.com>
To: Chenyi Qiang <chenyi.qiang@intel.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset
Date: Mon, 19 Dec 2022 10:01:48 +0100 [thread overview]
Message-ID: <008b5a99-497b-5c99-9366-d0eb9001a0e5@redhat.com> (raw)
In-Reply-To: <f030b3cb-71a9-a8e1-89b1-5fa2846afb8b@intel.com>
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
next prev parent reply other threads:[~2022-12-19 9:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 6:22 [PATCH] virtio-mem: Fix the bitmap index of the section offset Chenyi Qiang
2022-12-16 8:52 ` David Hildenbrand
2022-12-16 10:30 ` David Hildenbrand
2022-12-19 1:21 ` Chenyi Qiang
2022-12-19 9:01 ` David Hildenbrand [this message]
2022-12-19 10:51 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=008b5a99-497b-5c99-9366-d0eb9001a0e5@redhat.com \
--to=david@redhat.com \
--cc=chenyi.qiang@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).