From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Petr Mladek <pmladek@suse.com>,
virtualization@lists.linux-foundation.org,
Jeff Epler <jepler@unpythonic.net>, Tejun Heo <tj@kernel.org>,
Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH RFC] virtio_balloon: refill by config handler
Date: Fri, 1 Jan 2016 12:13:48 +0200 [thread overview]
Message-ID: <1451643122-21561-1-git-send-email-mst@redhat.com> (raw)
Peter Mladek reported that balloon might never refill completely after
restore. This is because fill_balloon is only called once there.
Calling fill_balloon repeatedly seems too aggressive,
especially in light of the fact that it sleeps on failure: let's
wake the config change handler and fill it asynchronously.
Reported-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
I was unable to test this - for some reason my test VM
doesn't resume (with or without the patch).
Petr, does this work for you?
drivers/virtio/virtio_balloon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 7efc329..ee29473 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -589,7 +589,7 @@ static int virtballoon_restore(struct virtio_device *vdev)
virtio_device_ready(vdev);
- fill_balloon(vb, towards_target(vb));
+ wake_up(&vb->config_change);
update_balloon_size(vb);
return 0;
}
--
MST
next reply other threads:[~2016-01-01 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 10:13 Michael S. Tsirkin [this message]
2016-01-05 14:37 ` [PATCH RFC] virtio_balloon: refill by config handler Petr Mladek
2016-01-05 15:31 ` 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=1451643122-21561-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=jepler@unpythonic.net \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).