All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
To: David Hildenbrand <david@redhat.com>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	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, 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, osalvador@suse.de
Subject: Re: [PATCH v15 6/7] virtio-balloon: Add support for providing free page reports to host
Date: Fri, 13 Dec 2019 08:37:01 -0800	[thread overview]
Message-ID: <f0153bdb80b26b99495cfc3086934968695deb6c.camel@linux.intel.com> (raw)
In-Reply-To: <ca305a98-864e-ccb0-5393-f73997645acf@redhat.com>

On Fri, 2019-12-13 at 11:15 +0100, David Hildenbrand wrote:
> On 05.12.19 17:22, Alexander Duyck wrote:
> > 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.
> > 
> > For this reason when I had originally introduced the patch set I referred
> > to this behavior as a "bubble" instead of a "balloon" since the duration
> > is short lived, and when the page is touched the "bubble" is popped and
> > the page is faulted back in.
> 
> While an interesting read, I would drop that comment as it isn't really
> of value for the code/codebase itself.

Okay, I can drop the comment.

> [...]
> 
> > +
> > +	vb->pr_dev_info.report = virtballoon_free_page_report;
> > +	if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_REPORTING)) {
> > +		unsigned int capacity;
> > +
> > +		capacity = virtqueue_get_vring_size(vb->reporting_vq);
> > +		if (capacity < PAGE_REPORTING_CAPACITY) {
> > +			err = -ENOSPC;
> > +			goto out_unregister_shrinker;
> 
> It's somewhat strange to fail loading the balloon completely here.
> Wouldn't it be better to print e.g. a warning but continue without free
> page reporting?
> 
> (I guess splitting up the list can be done in an addon patch if ever
> really needed for virtio-balloon)

That was kind of my thought. Odds are it probably is unlikely to come up.
At least with the code I have now I think the virtqueue size is something
like 128 and the capacity is only 32 as I wanted to limit the number of
pages that were being reported at the time.

> Apart from that
> 
> Reviewed-by: David Hildenbrand <david@redhat.com>
> 
> Thanks!
> 


Thanks for the review.

- Alex


  reply	other threads:[~2019-12-13 20:39 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 16:22 [PATCH v15 0/7] mm / virtio: Provide support for free page reporting Alexander Duyck
2019-12-05 16:22 ` [PATCH v15 1/7] mm: Adjust shuffle code to allow for future coalescing Alexander Duyck
2019-12-05 16:22 ` [PATCH v15 2/7] mm: Use zone and order instead of free area in free_list manipulators Alexander Duyck
2019-12-05 16:22 ` [PATCH v15 3/7] mm: Add function __putback_isolated_page Alexander Duyck
2019-12-16 11:36   ` David Hildenbrand
2019-12-16 16:22     ` Alexander Duyck
2019-12-16 16:22       ` Alexander Duyck
2019-12-17 10:58       ` David Hildenbrand
2019-12-17 16:26         ` Alexander Duyck
2019-12-17 16:26           ` Alexander Duyck
2019-12-17 17:24           ` David Hildenbrand
2019-12-17 18:24             ` Alexander Duyck
2019-12-17 18:24               ` Alexander Duyck
2019-12-17 18:46               ` David Hildenbrand
2019-12-17 21:50                 ` Alexander Duyck
2019-12-17 21:50                   ` Alexander Duyck
2019-12-05 16:22 ` [PATCH v15 4/7] mm: Introduce Reported pages Alexander Duyck
2019-12-16 10:17   ` Nitesh Narayan Lal
2019-12-16 16:28     ` Alexander Duyck
2019-12-16 16:28       ` Alexander Duyck
2019-12-17  8:55       ` Nitesh Narayan Lal
2019-12-17 16:31         ` Alexander Duyck
2019-12-17 16:31           ` Alexander Duyck
2019-12-18  7:31           ` Mel Gorman
2019-12-16 11:44   ` Nitesh Narayan Lal
2019-12-16 16:10     ` Alexander Duyck
2019-12-16 16:10       ` Alexander Duyck
2019-12-05 16:22 ` [PATCH v15 5/7] virtio-balloon: Pull page poisoning config out of free page hinting Alexander Duyck
2019-12-13  7:03   ` Michael S. Tsirkin
2019-12-05 16:22 ` [PATCH v15 6/7] virtio-balloon: Add support for providing free page reports to host Alexander Duyck
2019-12-13  7:08   ` Michael S. Tsirkin
2019-12-13 16:35     ` Alexander Duyck
2019-12-13 16:35       ` Alexander Duyck
2019-12-15  9:29       ` Michael S. Tsirkin
2019-12-13 10:15   ` David Hildenbrand
2019-12-13 16:37     ` Alexander Duyck [this message]
2019-12-13 16:37       ` Alexander Duyck
2019-12-05 16:23 ` [PATCH v15 7/7] mm: Add free page reporting documentation Alexander Duyck
2019-12-05 16:24 ` [PATCH v15 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature Alexander Duyck
2019-12-05 16:24   ` [virtio-dev] " Alexander Duyck
2019-12-05 16:24 ` [PATCH v15 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting Alexander Duyck
2019-12-05 16:24   ` [virtio-dev] " Alexander Duyck
2019-12-05 16:24 ` [PATCH v15 QEMU 3/3] virtio-balloon: Provide a interface for " Alexander Duyck
2019-12-05 16:24   ` [virtio-dev] " Alexander Duyck
2019-12-05 16:26 ` [PATCH v15 QEMU 4/3 RFC] memory: Add support for MADV_FREE as mechanism to lazy discard pages Alexander Duyck
2019-12-05 16:26   ` [virtio-dev] " Alexander Duyck
2019-12-12 23:47 ` [PATCH v15 0/7] mm / virtio: Provide support for free page reporting Alexander Duyck
2019-12-12 23:47   ` Alexander Duyck
2019-12-13 10:00 ` David Hildenbrand
2019-12-13 11:08   ` Mel Gorman
2019-12-13 16:59     ` Alexander Duyck
2019-12-13 16:59       ` Alexander Duyck
2019-12-13 16:46   ` Alexander Duyck
2019-12-13 16:46     ` Alexander Duyck
2019-12-16 12:21     ` 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=f0153bdb80b26b99495cfc3086934968695deb6c.camel@linux.intel.com \
    --to=alexander.h.duyck@linux.intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.duyck@gmail.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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.