From: David Hildenbrand <david@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: virtio-dev@lists.oasis-open.org,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, "Wang, Wei W" <wei.w.wang@intel.com>,
David Hildenbrand <dhildenb@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature
Date: Thu, 16 Apr 2020 20:33:56 +0200 [thread overview]
Message-ID: <f6545f81-dab0-2979-ca20-45333ec16e4e@redhat.com> (raw)
In-Reply-To: <CAKgT0UeVi=xnNxaVE5vB44rDwR4-m305wE671VdaK6R2TM6KGw@mail.gmail.com>
> The other thing to keep in mind is that the poison value only really
> comes into play with hinting/reporting. In the case of the standard
> balloon the pages are considered allocated from the guest's
Currently just as free page hinting IMHO. They are temporarily
considered allocated.
> perspective until the balloon is deflated. Then any poison/init will
> occur over again anyway so I don't think the standard balloon should
> really care.
I think we should make this consistent. And as we discuss below, this
allows for a nice optimization in the guest even for ordinary
inflation/deflation (no need to zero out/poison again when giving the
pages back to the buddy).
>
> For hinting it somewhat depends. Currently the implementation is
> inflating a balloon so having poisoning or init_on_free means it is
> written to immediately after it is freed so it defeats the purpose of
> the hinting. However that is a Linux implementation issue, not
Yeah, and as we discuss below, we can optimize that later in Linux. It's
sub-optimal, I agree.
> necessarily an issue with the QEMU implementation. As such may be I
> should fix that in the Linux driver since that has been ignored in
> QEMU up until now anyway. The more interesting bit is what should the
> behavior be from the hypervisor when a page is marked as being hinted.
> I think right now the behavior is to just not migrate the page. I
> wonder though if we shouldn't instead just consider the page a zero
> page, and then maybe modify the zero page behavior for the case where
> we know page poisoning is enabled.
I consider that maybe future work. Let's keep it simple for now (iow,
try to get page poisoning handling right first). The optimize the guest
handling on balloon deflation / end of free page hinting.
[...]
>> I can totally understand if Alex would want to stop working on
>> VIRTIO_BALLOON_F_PAGE_POISON at this point and only fix the guest to not
>> enable free page reporting in case we don't have
>> VIRTIO_BALLOON_F_PAGE_POISON (unless that's already done), lol. :)
>
> I already have a patch for that.
>
> The bigger issue is how to deal with the PAGE_POISON being enabled
> with FREE_PAGE_HINTING. The legacy code at this point is just broken
> and is plowing through with FREE_PAGE_HINTING while it is enabled.
> That is safe for now because it is using a balloon, the side effect is
> that it is going to defer migration. If it switches to a page
> reporting type setup at some point in the future we would need to make
> sure something is written to the other end to identify the poison/zero
> pages.
I think we don't have to worry about that for now. Might be sub-optimal,
but then, I don't think actual page poisoning isn't all that frequently
used in production setups.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-04-16 18:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 3:41 [PATCH v19 QEMU 0/4] virtio-balloon: add support for free page reporting Alexander Duyck
2020-04-10 3:41 ` [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature Alexander Duyck
2020-04-15 8:08 ` David Hildenbrand
2020-04-15 17:17 ` Alexander Duyck
2020-04-15 18:16 ` David Hildenbrand
2020-04-15 19:28 ` Alexander Duyck
2020-04-15 19:46 ` David Hildenbrand
2020-04-15 21:16 ` Alexander Duyck
2020-04-16 8:18 ` David Hildenbrand
2020-04-16 8:36 ` David Hildenbrand
2020-04-16 14:33 ` Michael S. Tsirkin
2020-04-16 14:55 ` David Hildenbrand
2020-04-16 18:21 ` Alexander Duyck
2020-04-16 18:33 ` David Hildenbrand [this message]
2020-04-10 3:41 ` [PATCH v19 QEMU 2/4] linux-headers: update to contain virito-balloon free page reporting Alexander Duyck
2020-04-10 3:41 ` [PATCH v19 QEMU 3/4] virtio-balloon: Provide an interface for " Alexander Duyck
2020-04-15 8:17 ` David Hildenbrand
2020-04-15 9:03 ` David Hildenbrand
2020-04-15 15:31 ` Alexander Duyck
2020-04-10 3:41 ` [PATCH v19 QEMU 4/4] memory: Do not allow direct write access to rom_device regions Alexander Duyck
2020-04-10 10:50 ` Paolo Bonzini
2020-04-13 22:48 ` Alexander Duyck
2020-04-14 7:36 ` David Hildenbrand
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=f6545f81-dab0-2979-ca20-45333ec16e4e@redhat.com \
--to=david@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=dhildenb@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=wei.w.wang@intel.com \
/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).