Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread David Miller
From: "Michael S. Tsirkin" 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 is

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Michael S. Tsirkin
On Tue, Feb 23, 2010 at 11:04:28PM -0800, David Miller wrote: > From: "Michael S. Tsirkin" > 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 int

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread David Miller
From: "Michael S. Tsirkin" 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.

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Michael S. Tsirkin
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 piec

[PULL] virtio & lguest

2010-02-23 Thread Rusty Russell
(Will be away for a month from tomorrow, so this is an early pull request). The following changes since commit 9f3a6284880ceea452903e2043c88d7226736318: Linus Torvalds (1): Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus are available in the git repository at

Re: virtio: console: Barrier needed before dropping early_put_chars?

2010-02-23 Thread Rusty Russell
On Wed, 24 Feb 2010 03:40:22 am Amit Shah wrote: > Hey Rusty, Christian, > > Christoph Hellwig asked why we don't need a barrier before this code in > virtcons_probe(): > > > + /* Start using the new console output. */ > > + early_put_chars = NULL; > > return 0; > > Since only s390

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread David Miller
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 al

Re: virtio: console: Barrier needed before dropping early_put_chars?

2010-02-23 Thread Christian Borntraeger
Am Dienstag 23 Februar 2010 18:10:22 schrieb Amit Shah: > Hey Rusty, Christian, > > Christoph Hellwig asked why we don't need a barrier before this code in > virtcons_probe(): > > > + /* Start using the new console output. */ > > + early_put_chars = NULL; > > return 0; > > Since on

Re: [PATCH 2/3] vhost: initialize log eventfd context pointer

2010-02-23 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > 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 Reviewed-by: Juan Quintela When log_ctx for device is created, it is copi

Re: [PATCH 1/3] vhost: logging math fix

2010-02-23 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > 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 Reviewed-b

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > get_user_pages_fast returns number of pages on success, negative value > on failure, but never 0. Fix vhost code to match this logic. It can return 0 if you ask for 0 pages :) >From the comment: * Returns number of pages pinned. This may be fewer than the number *

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Michael S. Tsirkin
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: > > 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: > > > > get_user_pages_fast

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Gleb Natapov
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: > > 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: > > > > On Tue, Feb 23, 201

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Gleb Natapov
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: > > On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote: > > > get_user_pages_fast returns number of pages on success, negative value > > > on failure,

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Michael S. Tsirkin
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: > > 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: Mic

Re: [PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Gleb Natapov
On Tue, Feb 23, 2010 at 06:57:58PM +0200, Michael S. Tsirkin wrote: > 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 > --- > drivers/vhost/vhost.c |3 ++- > 1 files ch

virtio: console: Barrier needed before dropping early_put_chars?

2010-02-23 Thread Amit Shah
Hey Rusty, Christian, Christoph Hellwig asked why we don't need a barrier before this code in virtcons_probe(): > + /* Start using the new console output. */ > + early_put_chars = NULL; > return 0; Since only s390 uses early_put_chars so far, you'd know why it's not needed / why we

[PATCH 0/3] vhost: logging fixes

2010-02-23 Thread Michael S. Tsirkin
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, Herbe

[PATCH 3/3] vhost: fix get_user_pages_fast error handling

2010-02-23 Thread Michael S. Tsirkin
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 --- drivers/vhost/vhost.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/vhost.c b/drive

[PATCH 2/3] vhost: initialize log eventfd context pointer

2010-02-23 Thread Michael S. Tsirkin
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 --- drivers/vhost/vhost.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/vhost/

[PATCH 1/3] vhost: logging math fix

2010-02-23 Thread Michael S. Tsirkin
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 --- drivers/vhost/vhost.c | 10 ++ 1 files