linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org,
	mst@redhat.com, linux-kernel@vger.kernel.org,
	willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, mgorman@techsingularity.net,
	vbabka@suse.cz
Cc: yang.zhang.wz@gmail.com, nitesh@redhat.com,
	konrad.wilk@oracle.com, david@redhat.com, pagupta@redhat.com,
	riel@surriel.com, lcapitulino@redhat.com, dave.hansen@intel.com,
	wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com,
	dan.j.williams@intel.com, alexander.h.duyck@linux.intel.com,
	osalvador@suse.de
Subject: [PATCH v16 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host
Date: Fri, 03 Jan 2020 13:21:14 -0800	[thread overview]
Message-ID: <20200103212114.29681.69388.stgit@localhost.localdomain> (raw)
In-Reply-To: <20200103210509.29237.18426.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/20200103211651.29237.84528.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


  parent reply	other threads:[~2020-01-03 21:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 21:16 [PATCH v16 0/9] mm / virtio: Provide support for free page reporting Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 1/9] mm: Adjust shuffle code to allow for future coalescing Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 2/9] mm: Use zone and order instead of free area in free_list manipulators Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 3/9] mm: Add function __putback_isolated_page Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 4/9] mm: Introduce Reported pages Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 5/9] virtio-balloon: Pull page poisoning config out of free page hinting Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 6/9] virtio-balloon: Add support for providing free page reports to host Alexander Duyck
2020-01-03 21:16 ` [PATCH v16 7/9] mm: Rotate free list so reported pages are moved to the tail of the list Alexander Duyck
2020-01-08 13:38   ` David Hildenbrand
2020-01-08 16:07     ` Alexander Duyck
2020-01-03 21:17 ` [PATCH v16 8/9] mm: Add budget limit to how many pages can be reported per list per pass Alexander Duyck
2020-01-03 21:17 ` [PATCH v16 9/9] mm: Add free page reporting documentation Alexander Duyck
2020-01-03 21:21 ` [PATCH v16 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature Alexander Duyck
2020-01-03 21:21 ` Alexander Duyck [this message]
2020-01-03 21:21 ` [PATCH v16 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting Alexander Duyck
2020-01-03 21:24 ` [PATCH v16 QEMU 4/3 RFC] memory: Add support for MADV_FREE as mechanism to lazy discard pages Alexander Duyck
2020-01-08  7:57 ` [PATCH v16 0/9] mm / virtio: Provide support for free page reporting Nitesh Narayan Lal
2020-01-08 16:29   ` Alexander Duyck
2020-01-15 23:08 ` 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=20200103212114.29681.69388.stgit@localhost.localdomain \
    --to=alexander.duyck@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=mst@redhat.com \
    --cc=nitesh@redhat.com \
    --cc=osalvador@suse.de \
    --cc=pagupta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=wei.w.wang@intel.com \
    --cc=willy@infradead.org \
    --cc=yang.zhang.wz@gmail.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).