linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: "Li, Liang Z" <liang.z.li@intel.com>, "mst@redhat.com" <mst@redhat.com>
Cc: "pbonzini@redhat.com" <pbonzini@redhat.com>,
	"amit.shah@redhat.com" <amit.shah@redhat.com>,
	"quintela@redhat.com" <quintela@redhat.com>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
	"cornelia.huck@de.ibm.com" <cornelia.huck@de.ibm.com>
Subject: Re: [PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
Date: Tue, 8 Nov 2016 10:30:30 -0800	[thread overview]
Message-ID: <2dcef4a7-4909-a994-a7d0-bc54a268e991@intel.com> (raw)
In-Reply-To: <F2CBF3009FA73547804AE4C663CAB28E3A108196@shsmsx102.ccr.corp.intel.com>

On 11/07/2016 09:50 PM, Li, Liang Z wrote:
> Sounds good.  Should we ignore some of the order-0 pages in step 4 if the bitmap is full?
> Or should retry to get a complete list of order-0 pages?

I think that's a pretty reasonable thing to do.

>>> It seems the benefit we get for this feature is not as big as that in fast
>> balloon inflating/deflating.
>>>>
>>>> You should not be using get_max_pfn().  Any patch set that continues
>>>> to use it is not likely to be using a proper algorithm.
>>>
>>> Do you have any suggestion about how to avoid it?
>>
>> Yes: get the pfns from the page free lists alone.  Don't derive
>> them from the pfn limits of the system or zones.
> 
> The ' get_max_pfn()' can be avoid in this patch, but I think we can't
> avoid it completely. We need it as a hint for allocating a proper
> size bitmap. No?

If you start with higher-order pages, you'll be unlikely to get anywhere
close to filling up a bitmap that was sized to hold all possible order-0
pages on the system.  Any use of max_pfn also means that you'll
completely mis-size bitmaps on sparse systems with large holes.

I think you should size it based on the size of the free lists, if anything.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-11-08 18:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02  6:17 [PATCH kernel v4 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 1/7] virtio-balloon: rework deflate to add page to a list Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 2/7] virtio-balloon: define new feature bit and head struct Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 3/7] mm: add a function to get the max pfn Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 4/7] virtio-balloon: speed up inflate/deflate process Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 5/7] mm: add the related functions to get unused page Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 6/7] virtio-balloon: define flags and head for host request vq Liang Li
2016-11-02  6:17 ` [PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info Liang Li
2016-11-04 18:10   ` Dave Hansen
2016-11-07  3:37     ` Li, Liang Z
2016-11-07 17:23       ` Dave Hansen
2016-11-08  5:50         ` Li, Liang Z
2016-11-08 18:30           ` Dave Hansen [this message]
2016-11-08 21:07         ` 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=2dcef4a7-4909-a994-a7d0-bc54a268e991@intel.com \
    --to=dave.hansen@intel.com \
    --cc=amit.shah@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liang.z.li@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.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