From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:01:28
The following patches on top of net-next fix issues related to write
logging in vhost. This fixes all known to me logging issues, migration
now works for me while under stress in both TX and RX directions.
Rusty's going on vacation, I am guessing he won't have time to review
this: Gleb, Juan, Herbert, could one of you review this patchset please?
There's also the send queue full issue reported by
Sridhar Samudrala which I'm testing various fixes for,
that patch is contained to vhost/net though,
so there's no conflict, patch will be posted separately.
Michael S. Tsirkin (3):
vhost: logging thinko fix
vhost: initialize log eventfd context pointer
vhost: fix get_user_pages_fast error handling
drivers/vhost/vhost.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:01:44
vhost was dong some complex math to get
offset to log at, and got it wrong by a couple of bytes,
while in fact it's simple: get address where we write,
subtract start of buffer, add log base.
Do it this way.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
@@ -1004,10 +1004,12 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)if(unlikely(vq->log_used)){/* Make sure data is seen before log. */smp_wmb();-log_write(vq->log_base,vq->log_addr+sizeof*vq->used->ring*-(vq->last_used_idx%vq->num),-sizeof*vq->used->ring);-log_write(vq->log_base,vq->log_addr,sizeof*vq->used->ring);+log_write(vq->log_base,+vq->log_addr+((void*)used-(void*)vq->used),+sizeof*used);+log_write(vq->log_base,+vq->log_addr+offsetof(structvring_used,idx),+sizeofvq->used->idx);if(vq->log_ctx)eventfd_signal(vq->log_ctx,1);}
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:01:46
vq log eventfd context pointer needs to be initialized, otherwise
operation may fail or oops if log is enabled but log eventfd not set by
userspace.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:01:57
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote:
quoted hunk
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:36:54
On Tue, Feb 23, 2010 at 07:34:34PM +0200, Gleb Natapov wrote:
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote:
quoted
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
On Tue, Feb 23, 2010 at 07:32:58PM +0200, Michael S. Tsirkin wrote:
On Tue, Feb 23, 2010 at 07:34:34PM +0200, Gleb Natapov wrote:
quoted
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote:
quoted
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-23 17:42:37
On Tue, Feb 23, 2010 at 07:39:52PM +0200, Gleb Natapov wrote:
On Tue, Feb 23, 2010 at 07:32:58PM +0200, Michael S. Tsirkin wrote:
quoted
On Tue, Feb 23, 2010 at 07:34:34PM +0200, Gleb Natapov wrote:
quoted
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote:
quoted
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
On Tue, Feb 23, 2010 at 07:39:08PM +0200, Michael S. Tsirkin wrote:
On Tue, Feb 23, 2010 at 07:39:52PM +0200, Gleb Natapov wrote:
quoted
On Tue, Feb 23, 2010 at 07:32:58PM +0200, Michael S. Tsirkin wrote:
quoted
On Tue, Feb 23, 2010 at 07:34:34PM +0200, Gleb Natapov wrote:
quoted
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote:
quoted
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/vhost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2010-02-23 22:42:19
Just for the record I'm generally not interested in vhost
patches.
If it's a specific network one that will be merged via
the networking tree, yes please CC: me.
But if it's a bunch of changes to vhost.c and other pieces
of infrastructure, feel free to leave me out of it. It just
clutters my already overflowing inbox.
Thanks.
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-24 05:41:08
On Tue, Feb 23, 2010 at 02:42:35PM -0800, David Miller wrote:
Just for the record I'm generally not interested in vhost
patches.
If it's a specific network one that will be merged via
the networking tree, yes please CC: me.
But if it's a bunch of changes to vhost.c and other pieces
of infrastructure, feel free to leave me out of it. It just
clutters my already overflowing inbox.
Thanks.
Dave, so while Rusty's on vacation, what's the best way to get vhost
infrastructure fixes in? Are you ok with getting pull requests and
merging them into net-next? That should keep the clutter in your inbox
to the minimum.
Of course network changes would still go the usual way.
--
MST
From: David Miller <davem@davemloft.net> Date: 2010-02-24 07:04:15
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 24 Feb 2010 07:37:37 +0200
Dave, so while Rusty's on vacation, what's the best way to get vhost
infrastructure fixes in? Are you ok with getting pull requests and
merging them into net-next? That should keep the clutter in your inbox
to the minimum.
Of course network changes would still go the usual way.
Well, who is providing oversight of vhost work while he's
gone? Has he, implicitly or explicitly, appointed a maintainer
while he's away?
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2010-02-24 07:39:50
On Tue, Feb 23, 2010 at 11:04:28PM -0800, David Miller wrote:
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 24 Feb 2010 07:37:37 +0200
quoted
Dave, so while Rusty's on vacation, what's the best way to get vhost
infrastructure fixes in? Are you ok with getting pull requests and
merging them into net-next? That should keep the clutter in your inbox
to the minimum.
Of course network changes would still go the usual way.
Well, who is providing oversight of vhost work while he's
gone?
My plan was to get peer review of the patches before merging.
So far Juan Quintela and Gleb Natapov gave feedback.
Has he, implicitly or explicitly, appointed a maintainer
while he's away?
Implicitly, I guess. He said "if there's an issue Michael Tsirkin is the
best person to resolve it", this was wrt merging his virtio&lguest tree.
He didn't mention vhost, I wrote all of vhost though, there shouldn't be
an issue with that.
--
MST
From: David Miller <davem@davemloft.net> Date: 2010-02-24 07:41:20
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 24 Feb 2010 09:34:25 +0200
Implicitly, I guess. He said "if there's an issue Michael Tsirkin is the
best person to resolve it", this was wrt merging his virtio&lguest tree.
He didn't mention vhost, I wrote all of vhost though, there shouldn't be
an issue with that.
That's good enough for me.
Feel free to setup a tree for me to pull from.