From: Alexander Duyck <alexander.duyck@gmail.com>
To: david@redhat.com, mst@redhat.com
Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: [PATCH v18 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host
Date: Wed, 08 Apr 2020 15:55:23 -0700 [thread overview]
Message-ID: <20200408225523.18764.86514.stgit@localhost.localdomain> (raw)
In-Reply-To: <20200408225302.18764.209.stgit@localhost.localdomain>
From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Add support for the page reporting feature provided by virtio-balloon.
Reporting differs from the regular balloon functionality in that is is
much less durable than a standard memory balloon. Instead of creating a
list of pages that cannot be accessed the pages are only inaccessible
while they are being indicated to the virtio interface. Once the
interface has acknowledged them they are placed back into their respective
free lists and are once again accessible by the guest system.
Unlike a standard balloon we don't inflate and deflate the pages. Instead
we perform the reporting, and once the reporting is completed it is
assumed that the page has been dropped from the guest and will be faulted
back in the next time the page is accessed.
This patch is a subset of the UAPI patch that was submitted for the Linux
kernel. The original patch can be found at:
https://lore.kernel.org/lkml/20200211224657.29318.68624.stgit@localhost.localdomain/
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
---
include/standard-headers/linux/virtio_balloon.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/standard-headers/linux/virtio_balloon.h b/include/standard-headers/linux/virtio_balloon.h
index 9375ca2a70de..1c5f6d6f2de6 100644
--- a/include/standard-headers/linux/virtio_balloon.h
+++ b/include/standard-headers/linux/virtio_balloon.h
@@ -36,6 +36,7 @@
#define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
+#define VIRTIO_BALLOON_F_REPORTING 5 /* Page reporting virtqueue */
/* Size of a PFN in the balloon interface. */
#define VIRTIO_BALLOON_PFN_SHIFT 12
next prev parent reply other threads:[~2020-04-08 22:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 22:55 [PATCH v18 QEMU 0/3] virtio-balloon: add support for providing free page reporting Alexander Duyck
2020-04-08 22:55 ` [PATCH v18 QEMU 1/3] virtio-balloon: Implement support for page poison tracking feature Alexander Duyck
2020-04-08 22:55 ` Alexander Duyck [this message]
2020-04-09 7:35 ` [PATCH v18 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host David Hildenbrand
2020-04-09 14:41 ` Alexander Duyck
2020-04-09 14:43 ` David Hildenbrand
2020-04-08 22:55 ` [PATCH v18 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting Alexander Duyck
2020-04-09 7:44 ` David Hildenbrand
2020-04-09 17:34 ` Alexander Duyck
2020-04-09 17:35 ` David Hildenbrand
2020-04-10 3:36 ` Alexander Duyck
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=20200408225523.18764.86514.stgit@localhost.localdomain \
--to=alexander.duyck@gmail.com \
--cc=david@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virtio-dev@lists.oasis-open.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).