All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Wei W" <wei.w.wang@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "yang.zhang.wz@gmail.com" <yang.zhang.wz@gmail.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"riel@redhat.com" <riel@redhat.com>,
	"quan.xu0@gmail.com" <quan.xu0@gmail.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"nilal@redhat.com" <nilal@redhat.com>,
	"liliang.opensource@gmail.com" <liliang.opensource@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: RE: [PATCH v24 1/2] mm: support reporting free page blocks
Date: Sat, 27 Jan 2018 13:13:05 +0000	[thread overview]
Message-ID: <286AC319A985734F985F78AFA26841F7393ED398__8970.24176451868$1517058714$gmane$org@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20180126233950-mutt-send-email-mst@kernel.org>

On Saturday, January 27, 2018 5:44 AM, Michael S. Tsirkin wrote:
> On Fri, Jan 26, 2018 at 05:00:09PM +0200, Michael S. Tsirkin wrote:
> > On Fri, Jan 26, 2018 at 11:29:15AM +0800, Wei Wang wrote:
> > > On 01/25/2018 09:41 PM, Michael S. Tsirkin wrote:
> > > > On Wed, Jan 24, 2018 at 06:42:41PM +0800, Wei Wang wrote:
> > > 2) If worse, all the blocks have been split into smaller blocks and
> > > used after the caller comes back.
> > >
> > > where could we continue?
> >
> > I'm not sure. But an alternative appears to be to hold a lock and just
> > block whoever wanted to use any pages.  Yes we are sending hints
> > faster but apparently something wanted these pages, and holding the
> > lock is interfering with this something.
> 
> I've been thinking about it. How about the following scheme:
> 1. register balloon to get a (new) callback when free list runs empty 2. take
> pages off the free list, add them to the balloon specific list 3. report to host 4.
> readd to free list at tail 5. if callback triggers, interrupt balloon reporting to
> host,
>    and readd to free list at tail

So in step 2, when we walk through the free page list, take each block, and add them to the balloon specific list, is this performed under the mm lock? If it is still under the lock, then what would be the difference compared to walking through the free list, and add each block to virtqueue? 

Best,
Wei

  parent reply	other threads:[~2018-01-27 13:13 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 10:42 [PATCH v24 0/2] Virtio-balloon: support free page reporting Wei Wang
2018-01-24 10:42 ` [virtio-dev] " Wei Wang
2018-01-24 10:42 ` Wei Wang
2018-01-24 10:42 ` [PATCH v24 1/2] mm: support reporting free page blocks Wei Wang
2018-01-24 10:42 ` Wei Wang
2018-01-24 10:42   ` [virtio-dev] " Wei Wang
2018-01-24 10:42   ` Wei Wang
2018-01-25 13:41   ` Michael S. Tsirkin
2018-01-25 13:41     ` [virtio-dev] " Michael S. Tsirkin
2018-01-25 13:41     ` Michael S. Tsirkin
2018-01-25 14:56     ` Pankaj Gupta
2018-01-25 14:56       ` Pankaj Gupta
2018-01-25 17:31       ` Michael S. Tsirkin
2018-01-25 17:31       ` Michael S. Tsirkin
2018-01-25 17:31         ` [virtio-dev] " Michael S. Tsirkin
2018-01-25 17:31         ` Michael S. Tsirkin
2018-01-25 14:56     ` Pankaj Gupta
2018-01-26  3:29     ` Wei Wang
2018-01-26  3:29       ` [virtio-dev] " Wei Wang
2018-01-26  3:29       ` Wei Wang
2018-01-26 15:00       ` Michael S. Tsirkin
2018-01-26 15:00       ` Michael S. Tsirkin
2018-01-26 15:00         ` [virtio-dev] " Michael S. Tsirkin
2018-01-26 15:00         ` Michael S. Tsirkin
2018-01-26 21:43         ` Michael S. Tsirkin
2018-01-26 21:43         ` Michael S. Tsirkin
2018-01-26 21:43           ` [virtio-dev] " Michael S. Tsirkin
2018-01-26 21:43           ` Michael S. Tsirkin
2018-01-27 13:13           ` Wang, Wei W
2018-01-27 13:13             ` [virtio-dev] " Wang, Wei W
2018-01-27 13:13             ` Wang, Wei W
2018-01-27 13:13           ` Wang, Wei W [this message]
2018-01-27 14:00         ` Wang, Wei W
2018-01-27 14:00           ` [virtio-dev] " Wang, Wei W
2018-01-27 14:00           ` Wang, Wei W
2018-01-27 14:00         ` Wang, Wei W
2018-01-26  3:29     ` Wei Wang
2018-01-25 13:41   ` Michael S. Tsirkin
2018-01-24 10:42 ` [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang
2018-01-24 10:42   ` [virtio-dev] " Wei Wang
2018-01-24 10:42   ` Wei Wang
2018-01-24 17:15   ` Michael S. Tsirkin
2018-01-24 17:15     ` [virtio-dev] " Michael S. Tsirkin
2018-01-24 17:15     ` Michael S. Tsirkin
2018-01-25  3:32     ` Wei Wang
2018-01-25  3:32     ` Wei Wang
2018-01-25  3:32       ` [virtio-dev] " Wei Wang
2018-01-25  3:32       ` Wei Wang
2018-01-25 11:28       ` Tetsuo Handa
2018-01-25 11:28         ` Tetsuo Handa
2018-01-25 12:55         ` Wei Wang
2018-01-25 12:55           ` [virtio-dev] " Wei Wang
2018-01-25 12:55           ` Wei Wang
2018-01-25 12:55           ` Wei Wang
2018-02-01 19:14         ` Michael S. Tsirkin
2018-02-01 19:14           ` [virtio-dev] " Michael S. Tsirkin
2018-02-01 19:14           ` Michael S. Tsirkin
2018-02-01 19:14         ` Michael S. Tsirkin
2018-01-25 11:28       ` Tetsuo Handa
2018-01-25  9:45     ` Wei Wang
2018-01-25  9:45     ` Wei Wang
2018-01-25  9:45       ` [virtio-dev] " Wei Wang
2018-01-25  9:45       ` Wei Wang
2018-01-24 17:15   ` Michael S. Tsirkin
2018-01-24 10:42 ` Wei Wang

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='286AC319A985734F985F78AFA26841F7393ED398__8970.24176451868$1517058714$gmane$org@SHSMSX101.ccr.corp.intel.com' \
    --to=wei.w.wang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=liliang.opensource@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mst@redhat.com \
    --cc=nilal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=quan.xu0@gmail.com \
    --cc=riel@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.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.