Re: [PATCH 14/18] virtio: add api for delayed callbacks

2011-05-20 Thread Rusty Russell
On Thu, 19 May 2011 10:24:12 +0300, "Michael S. Tsirkin" wrote: > On Mon, May 16, 2011 at 04:43:21PM +0930, Rusty Russell wrote: > > On Sun, 15 May 2011 15:48:18 +0300, "Michael S. Tsirkin" > > wrote: > > > On Mon, May 09, 2011 at 03:27:33PM +0930

Re: [PATCH RFC] virtio_net: fix patch: virtio_net: limit xmit polling

2011-05-19 Thread Rusty Russell
On Thu, 19 May 2011 01:01:25 +0300, "Michael S. Tsirkin" wrote: > The patch virtio_net: limit xmit polling > got the logic reversed: it polled while we had > capacity not while ring was empty. > > Fix it up and clean up a bit by using a for loop. > > Signed-off-by: Michael S. Tsirkin > --- >

Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-17 Thread Rusty Russell
On Tue, 17 May 2011 09:00:52 +0300, "Michael S. Tsirkin" wrote: > On Mon, May 16, 2011 at 03:53:19PM +0930, Rusty Russell wrote: > > On Sun, 15 May 2011 15:47:27 +0300, "Michael S. Tsirkin" > > wrote: > > > On Mon, May 09, 2011 at 01:43:15PM +0930

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-17 Thread Rusty Russell
On Tue, 17 May 2011 09:10:31 +0300, "Michael S. Tsirkin" wrote: > Well one can imagine a driver doing: > > while (virtqueue_get_buf()) { > virtqueue_add_buf() > } > virtqueue_kick() > > which looks sensible (batch kicks) but might > process any number of bufs bet

Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 15:47:27 +0300, "Michael S. Tsirkin" wrote: > On Mon, May 09, 2011 at 01:43:15PM +0930, Rusty Russell wrote: > > On Wed, 4 May 2011 23:51:19 +0300, "Michael S. Tsirkin" > > wrote: > > > #define VIRTIO_RING_F_USED_EVENT_IDX

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 16:55:41 +0300, "Michael S. Tsirkin" wrote: > On Mon, May 09, 2011 at 02:03:26PM +0930, Rusty Russell wrote: > > On Wed, 4 May 2011 23:51:47 +0300, "Michael S. Tsirkin" > > wrote: > > > Use the new avail_event feature to red

Re: [PATCH 14/18] virtio: add api for delayed callbacks

2011-05-16 Thread Rusty Russell
On Sun, 15 May 2011 15:48:18 +0300, "Michael S. Tsirkin" wrote: > On Mon, May 09, 2011 at 03:27:33PM +0930, Rusty Russell wrote: > > On Wed, 4 May 2011 23:52:33 +0300, "Michael S. Tsirkin" > > wrote: > > > Add an API that tells the other side that c

Re: [PATCH 3/3] virtio_ring: need_event api comment fix

2011-05-08 Thread Rusty Russell
On Thu, 5 May 2011 18:08:17 +0300, "Michael S. Tsirkin" wrote: > fix typo in a comment: size -> side > > Reported-by: Stefan Hajnoczi > Signed-off-by: Michael S. Tsirkin I could smerge these together for you, but I *really* want benchmarks in these commit messages. Thanks, Rusty. PS. Was away

Re: [PATCH 14/18] virtio: add api for delayed callbacks

2011-05-08 Thread Rusty Russell
On Wed, 4 May 2011 23:52:33 +0300, "Michael S. Tsirkin" wrote: > Add an API that tells the other side that callbacks > should be delayed until a lot of work has been done. > Implement using the new used_event feature. Since you're going to add a capacity query anyway, why not add the threshold ar

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-08 Thread Rusty Russell
On Wed, 4 May 2011 23:51:47 +0300, "Michael S. Tsirkin" wrote: > Use the new avail_event feature to reduce the number > of exits from the guest. Figures here would be nice :) > @@ -228,6 +237,12 @@ add_head: >* new available array entries. */ > virtio_wmb(); > vq->vring.avail

Re: [PATCH 08/18] virtio_ring: support for used_event idx feature

2011-05-08 Thread Rusty Russell
On Wed, 4 May 2011 23:51:38 +0300, "Michael S. Tsirkin" wrote: > Add support for the used_event idx feature: when enabling > interrupts, publish the current avail index value to > the host so that we get interrupts on the next update. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/virtio

Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-08 Thread Rusty Russell
On Wed, 4 May 2011 23:51:19 +0300, "Michael S. Tsirkin" wrote: > Define a new feature bit for the host to > declare that it uses an avail_event index > (like Xen) instead of a feature bit > to enable/disable interrupts. > > Signed-off-by: Michael S. Tsirkin > --- > include/linux/virtio_ring.h |

Re: [RFC PATCH TRIVIAL] Reading the virtio code...

2011-04-27 Thread Rusty Russell
On Sat, 23 Apr 2011 18:13:34 -0500, Rob Landley wrote: > From: Rob Landley > > Going indirect for only two buffers isn't likely to be a performance win > because the kmalloc/kfree overhead for the indirect block can't be cheaper > than one extra linked list traversal. Unfortunately it's not com

Re: [PATCH] driver, virtio: Modify the err hanlding logic

2011-04-27 Thread Rusty Russell
On Wed, 20 Apr 2011 21:21:59 +0800, Liu Yuan wrote: > From: Liu Yuan > > In the function vp_request_msix_vectors(), when > pci_enable_msix() returns 0, there will be > redundant double checks for 'err'. This patch > fixes it to avoid the unnecessary check. > > Signed-off-by: Liu Yuan > --- >

Re: [RFC][PATCH] virtio balloon: kill tell-host-first logic

2011-04-18 Thread Rusty Russell
On Thu, 14 Apr 2011 13:30:05 -0700, Dave Hansen wrote: > Here's a new commit message: Applied, thanks. Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization

Re: [RFC][PATCH] virtio balloon: kill tell-host-first logic

2011-04-15 Thread Rusty Russell
On Tue, 12 Apr 2011 09:22:32 -0700, Dave Hansen wrote: > On Tue, 2011-04-12 at 11:13 +0530, Amit Shah wrote: > > Sure, the only contention was on the commit message, where you stated > > modern qemus set this... qemu doesn't, and it should. Care to do a > > patch for that? > > If Rusty hasn't p

Re: [RFC][PATCH] virtio: 64 bit features

2011-04-11 Thread Rusty Russell
On Mon, 11 Apr 2011 19:55:25 +0300, "Michael S. Tsirkin" wrote: > Extend features to 64 bit so we can use more > transport bits. > > Future patches add two new feature bits which would > exhaust the supply of transport feature bits, > so let's add bit 31 to tell the guest that > there are now 64

Re: [RFC][PATCH] virtio balloon: kill tell-host-first logic

2011-04-09 Thread Rusty Russell
On Thu, 07 Apr 2011 10:43:25 -0700, Dave Hansen wrote: > > The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST > feature bit. Whenever the bit is set, we must always tell the > host before we free pages back to the allocator. Without this > we might free a page (and have another use

Re: [PATCH] virtio_blk: decrement index when blockdevice is removed

2011-04-05 Thread Rusty Russell
On Tue, 05 Apr 2011 07:08:12 +0200, Jens Axboe wrote: > On 2011-04-05 06:49, Takuma Umeya wrote: > > When virtio block device is removed, index does not get decremented. When > > another virtio disk is attached it uses the next device letter to the > > one that is suppose to be available. > >

Re: [PATCH] virtio: Decrement avail idx on buffer detach

2011-04-04 Thread Rusty Russell
On Mon, 28 Mar 2011 19:57:06 +0530, Amit Shah wrote: > On (Thu) 17 Mar 2011 [17:56:59], Amit Shah wrote: > > On (Thu) 17 Mar 2011 [15:26:28], Rusty Russell wrote: > > > On Wed, 16 Mar 2011 19:12:10 +0530, Amit Shah > > > wrote: > > > > When detaching

Re: [PATCH] virtio: Decrement avail idx on buffer detach

2011-03-17 Thread Rusty Russell
On Wed, 16 Mar 2011 19:12:10 +0530, Amit Shah wrote: > When detaching a buffer from a vq, the avail.idx value should be > decremented as well. > > This was noticed by hot-unplugging a virtio console port and then > plugging in a new one on the same number (re-using the vqs which were > just 'diso

Re: [PATCH] virtio: console: Enable call to hvc_remove() on console port remove

2011-03-15 Thread Rusty Russell
On Mon, 14 Mar 2011 17:45:48 +0530, Amit Shah wrote: > This call was disabled as hot-unplugging one virtconsole port led to > another virtconsole port freezing. > > Upon testing it again, this now works, so enable it. Applied, Rusty. ___ Virtualization

Re: [PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug

2011-03-15 Thread Rusty Russell
On Mon, 14 Mar 2011 17:45:02 +0530, Amit Shah wrote: > In the case where a virtio-console port is in use (opened by a program) > and a virtio-console device is removed, the port is kept around but all > the virtio-related state is assumed to be gone. > > When the port is finally released (close()

Re: [PATCH 00/02] virtio: Virtio platform driver

2011-03-15 Thread Rusty Russell
On Thu, 10 Mar 2011 16:05:41 +0900, Magnus Damm wrote: > virtio: Virtio platform driver > > [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c > [PATCH 02/02] virtio: Add virtio platform driver I have no problem with these patches, but it's just churn until we see your actual

Re: [PATCH 0/2] Fix hot-unplug: device removal while port in use

2011-03-15 Thread Rusty Russell
On Fri, 11 Mar 2011 16:46:28 +0530, Amit Shah wrote: > Ideally virtio_pci_release_dev() shouldn't be needed at all; all that > work can be moved to virtio_pci_remove(). virtio_pci_release_dev() > was added in 29f9f12e to curb a warning: > > virtio: add PCI device release() function > >

[PATCH] virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT.

2011-03-08 Thread Rusty Russell
That's already been done by the virtio infrastructure before the probe function is called. Reported-by: alexey.kardashevs...@au1.ibm.com Signed-off-by: Rusty Russell diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c --- a/drivers/char/virtio_console.c +++ b/drivers

[PATCH] virtio: console: Don't access vqs if device was unplugged

2011-03-04 Thread Rusty Russell
simply not access vq information if port->portdev is NULL. Reported-by: juzhang CC: sta...@kernel.org Signed-off-by: Amit Shah Signed-off-by: Rusty Russell --- drivers/char/virtio_console.c |8 1 file changed, 8 insertions(+) diff --git a/drivers/char/virtio_console.c b/drivers/c

Re: [PATCH 0/2] Fix hot-unplug: device removal while port in use

2011-03-02 Thread Rusty Russell
On Wed, 2 Mar 2011 13:53:06 +0530, Amit Shah wrote: > A crash was observed when a device gets removed while a port is in > use. When the port gets removed, we tried to free vq buffers. The vq > no longer exists at this stage, just ensure we don't access it. > > The second patch fixes a warning

Re: [PATCH] virtio: use __GFP_NOWARN for try_fill_recv in virtnet_poll

2011-02-15 Thread Rusty Russell
On Tue, 15 Feb 2011 08:55:50 pm Michal Hocko wrote: > On Tue 15-02-11 20:41:29, Rusty Russell wrote: > > On Tue, 15 Feb 2011 08:05:27 pm Michal Hocko wrote: > > > Hi, > > > we have started seeing a lot of allocator messages complaining about > > > failed alloc

Re: [PATCH] virtio: use __GFP_NOWARN for try_fill_recv in virtnet_poll

2011-02-15 Thread Rusty Russell
On Tue, 15 Feb 2011 08:05:27 pm Michal Hocko wrote: > Hi, > we have started seeing a lot of allocator messages complaining about > failed allocations from virtnet_poll in soft IRQ. Could you consider the > following patch, please? Do we really want to silence this? Isn't warning about it kind of

[PATCH] virtio_net: Add schedule check to napi_enable call

2011-02-09 Thread Rusty Russell
nt to each napi_enable. Signed-off-by: Bruce Rogers Signed-off-by: Olaf Kirch Cc: sta...@kernel.org Signed-off-by: Rusty Russell --- drivers/net/virtio_net.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/vi

Re: [PATCH] virtio-net: add schedule check to napi_enable call in refill_work

2011-02-09 Thread Rusty Russell
On Thu, 10 Feb 2011 06:59:25 am Ken Stailey wrote: > Justification: > > Impact: Under heavy network I/O load virtio-net driver crashes making VM > guest unusable. Hmm, this went badly wrong. I acked this patch, and it was mailed to netdev six months ago. Bruce's patch used spaces instead of ta

Re: [PATCH] virtio: update MAINTAINERS

2011-01-31 Thread Rusty Russell
On Tue, 1 Feb 2011 08:41:44 am Linus Torvalds wrote: > On Mon, Jan 31, 2011 at 4:16 PM, Rusty Russell wrote: > > Patches should keep coming through Rusty but it > > helps if I'm Cc'd as well. > > This commit log makes no sense as being yours. It's clearly fr

Re: [PATCH 1/2] virtio: console: Wake up outvq on host notifications

2011-01-31 Thread Rusty Russell
On Mon, 31 Jan 2011 08:33:15 pm Rusty Russell wrote: > On Mon, 31 Jan 2011 06:06:36 pm Amit Shah wrote: > > The outvq needs to be woken up on host notifications so that buffers > > consumed by the host can be reclaimed, outvq freed, and application > > writes may proceed aga

Re: [PATCH 1/2] virtio: console: Wake up outvq on host notifications

2011-01-31 Thread Rusty Russell
On Mon, 31 Jan 2011 06:06:36 pm Amit Shah wrote: > The outvq needs to be woken up on host notifications so that buffers > consumed by the host can be reclaimed, outvq freed, and application > writes may proceed again. > > The need for this is now finally noticed when I have qemu patches ready > to

[PATCH] virtio: update MAINTAINERS

2011-01-30 Thread Rusty Russell
Patches should keep coming through Rusty but it helps if I'm Cc'd as well. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 23d0436..7de75ad 100644 --- a/M

[PULL] lguest and virtio.

2011-01-20 Thread Rusty Russell
_EXEC, fix limit logic lguest: document --rng in example Launcher Randy Dunlap (1): LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO) Rusty Russell (1): lguest: compile fixes Documentation/lguest

Re: [PATCH] virtio: remove virtio-pci root device

2011-01-16 Thread Rusty Russell
On Tue, 11 Jan 2011 03:49:04 am Michael S. Tsirkin wrote: > On Mon, Jan 10, 2011 at 07:10:46PM +0200, Gleb Natapov wrote: > > On Fri, Jan 07, 2011 at 02:55:06AM -0600, Milton Miller wrote: > > > We sometimes need to map between the virtio device and > > > the given pci device. One such use is OS in

Re: Flow Control and Port Mirroring Revisited

2011-01-16 Thread Rusty Russell
On Mon, 17 Jan 2011 09:07:30 am Simon Horman wrote: [snip] I've been away, but what concerns me is that socket buffer limits are bypassed in various configurations, due to skb cloning. We should probably drop such limits altogether, or fix them to be consistent. Simple fix is as someone suggest

Re: [PATCH] LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO)

2011-01-03 Thread Rusty Russell
On Sun, 2 Jan 2011 05:38:46 am Randy Dunlap wrote: > From: Randy Dunlap > > Honor the kconfig menu hierarchy to remove kconfig dependency warnings: > VIRTIO and VIRTIO_RING are subordinate to VIRTUALIZATION. > > warning: (LGUEST_GUEST) selects VIRTIO which has unmet direct dependencies > (VIRTU

Re: [GIT PULL net-next-2.6] vhost-net: tools, cleanups, optimizations

2010-12-13 Thread Rusty Russell
On Tue, 14 Dec 2010 03:54:47 am Michael S. Tsirkin wrote: > On Mon, Dec 13, 2010 at 12:44:13PM +0200, Michael S. Tsirkin wrote: > > Please merge the following tree for 2.6.38. > > Thanks! > > Um, I sent this out before I noticed the mail from Rusty > with some questions on the test code. I missed

Re: [PATCH 2/2] tools/virtio: virtio_test tool

2010-12-05 Thread Rusty Russell
On Tue, 30 Nov 2010 03:46:37 am Michael S. Tsirkin wrote: > This is the userspace part of the tool: it includes a bunch of stubs for > linux APIs, somewhat simular to linuxsched. This makes it possible to > recompile the ring code in userspace. > > A small test example is implemented combining thi

[PULL] virtio fixes (and one trivial module cleanup)

2010-11-23 Thread Rusty Russell
(lguest is currently broken, but timed out chasing it; expect a patch next week once I get back). The following changes since commit 3561d43fd289f590fdae672e5eb831b8d5cf0bf6: Linux 2.6.37-rc3 (2010-11-21 15:18:56 -0800) are available in the git repository at: ssh://master.kernel.org/pub/sc

Re: [PATCH] virtio: fix format of sysfs driver/vendor files

2010-11-10 Thread Rusty Russell
On Wed, 10 Nov 2010 04:50:29 pm Stephen Hemminger wrote: > The sysfs files for virtio produce the wrong format and are missing > the required newline. The output for virtio bus vendor/device should > have the same format as the corresponding entries for PCI devices. > > Although this technically c

Re: [ovs-dev] Flow Control and Port Mirroring

2010-11-07 Thread Rusty Russell
On Sat, 30 Oct 2010 01:29:33 pm Simon Horman wrote: > [ CCed VHOST contacts ] > > On Thu, Oct 28, 2010 at 01:22:02PM -0700, Jesse Gross wrote: > > On Thu, Oct 28, 2010 at 4:54 AM, Simon Horman wrote: > > > My reasoning is that in the non-mirroring case the guest is > > > limited by the external i

Re: [PATCH] Char: virtio_console, fix memory leak

2010-11-07 Thread Rusty Russell
On Sat, 6 Nov 2010 07:36:50 pm Jiri Slaby wrote: > Stanse found that in init_vqs, memory is leaked under certain > circumstanses (the fail path order is incorrect). Fix that by checking > allocations in one turn and free all of them at once if some fails > (some may be NULL, but this is OK). Good

Re: [Qemu-devel] Re: [PATCH] Implement a virtio GPU transport

2010-10-29 Thread Rusty Russell
On Wed, 27 Oct 2010 11:30:31 pm Ian Molton wrote: > On 19/10/10 11:39, Avi Kivity wrote: > > On 10/19/2010 12:31 PM, Ian Molton wrote: > > >>> 2. should start with a patch to the virtio-pci spec to document what > >>> you're doing > >> > >> Where can I find that spec? > > > > http://ozlabs.org/~ru

[PULL] virtio (console and one block)

2010-10-21 Thread Rusty Russell
The following changes since commit f6f94e2ab1b33f0082ac22d71f66385a60d8157f: Linux 2.6.36 (2010-10-20 13:30:22 -0700) are available in the git repository at: ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git virtio Amit Shah (18): virtio: console: Reset v

virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Rusty Russell
n the virtio ring as well as they don't return -EAGAIN to userspace. Signed-off-by: Amit Shah Acked-by: Hans de Goede CC: sta...@kernel.org Signed-off-by: Rusty Russell --- drivers/char/virtio_console.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-)

Re: [PATCH] virtio-spec trivial fixes

2010-10-06 Thread Rusty Russell
On Wed, 6 Oct 2010 12:20:01 am Amit Shah wrote: > Hello Rusty, > > A few trivial fixes on top of virtio-spec-0.8.9 (patch -p0): Thanks, applied. If you turn on lyx change tracking, patches get uglier but it means annotations of differences show up in next version. Thanks! Rusty. ___

[PULL] virtio console fixes and lguest comment fix

2010-09-20 Thread Rusty Russell
ux-2.6-for-linus.git master Amit Shah (1): virtio: console: Prevent userspace from submitting NULL buffers Hans de Goede (1): virtio: console: Fix poll blocking even though there is data to read Rusty Russell (1): lguest: update comments to reflect LHCALL_LOAD_GDT_ENTRY. arch/

Re: [PATCH 1/2] virtio: console: Fix poll blocking even though there is data to read

2010-09-19 Thread Rusty Russell
On Thu, 16 Sep 2010 06:43:08 pm Amit Shah wrote: > From: Hans de Goede > > I found this while working on a Linux agent for spice, the symptom I was > seeing was select blocking on the spice vdagent virtio serial port even > though there were messages queued up there. > > virtio_console's port_fo

Re: PATCH: virtio_console: Fix poll blocking even though there is data to read

2010-09-15 Thread Rusty Russell
On Wed, 15 Sep 2010 11:16:24 pm Amit Shah wrote: > On (Wed) Sep 15 2010 [15:37:21], Hans de Goede wrote: > > >>--- linux-2.6.35.x86_64/drivers/char/virtio_console.c~2010-08-02 > > >>00:11:14.0 +0200 > > >>+++ linux-2.6.35.x86_64/drivers/char/virtio_console.c 2010-09-15 > > >>13:39

Re: [PATCH 2/3] S390: Add virtio hotplug add support

2010-09-12 Thread Rusty Russell
On Sun, 12 Sep 2010 06:30:43 pm Avi Kivity wrote: > On 09/12/2010 02:42 AM, Alexander Graf wrote: > > On 24.08.2010, at 15:48, Alexander Graf wrote: > > > >> The one big missing feature in s390-virtio was hotplugging. This is no > >> more. > >> This patch implements hotplug add support, so you c

Re: [PATCH 3/3] virtio: console: Send SIGIO in case of port unplug

2010-09-06 Thread Rusty Russell
On Thu, 2 Sep 2010 10:47:54 pm Amit Shah wrote: > If a port has registered for SIGIO signals, let the application > know that the port is getting unplugged. > > Signed-off-by: Amit Shah Thanks Amit, these patches were really well organized and nice to read. Applied them all... Rusty. __

Re: [PATCH 02/14] virtio: console: Remove control vq data only if using multiport support

2010-09-06 Thread Rusty Russell
On Thu, 2 Sep 2010 10:11:41 pm Amit Shah wrote: > If a portdev isn't using multiport support, it won't have any control vq > data to remove. > > Signed-off-by: Amit Shah So previously it would crash if it was ever removed? If so, it'd be nice to see that in the patch description :) Thanks, Rus

Re: Using virtio as a physical (wire-level) transport

2010-08-15 Thread Rusty Russell
On Sat, 14 Aug 2010 09:04:19 pm Alexander Graf wrote: > > Am 06.08.2010 um 11:34 schrieb "Ira W. Snyder" : > > This problem is not limited to my new use of virtio. Virtio is > > completely useless in a relatively common virtualization scenario: > > x86 host with qemu-ppc guest. Or any other big en

[PATCH] virtio: fix oops on OOM

2010-07-26 Thread Rusty Russell
stead, but let's apply a minimal fix for 2.6.35. Reported-by: Chris Mason Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell Tested-by: Chris Mason Cc: sta...@kernel.org # .34.x --- drivers/virtio/virtio_ring.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -

[PATCH] virtio: fix oops on OOM

2010-07-22 Thread Rusty Russell
stead, but let's apply a minimal fix for 2.6.35. Reported-by: Chris Mason Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell Tested-by: Chris Mason --- diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index dd35b34..bffec32 100644 --- a/drivers/virti

Re: [RFC] virtio: Support releasing lock during kick

2010-06-24 Thread Rusty Russell
On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote: > On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori > wrote: > > Shouldn't it be possible to just drop the lock before invoking > > virtqueue_kick() and reacquire it afterwards? There's nothing in that > > virtqueue_kick() path that the lock

Re: [PATCH 0/2] v2: Add 'serial' attribute to virtio-blk devices

2010-06-24 Thread Rusty Russell
On Thu, 24 Jun 2010 12:49:56 pm Ryan Harper wrote: > Using Rusty's suggestion I've respun the patch removing the special copy > function. I've tested this patch in a guest kernel with and without qemu > supplying serial numbers for the block devices and it's working as expected. > When qemu suppli

[PULL] virtio fixes

2010-06-23 Thread Rusty Russell
: Michael S. Tsirkin Acked-by: Amit Shah Signed-off-by: Rusty Russell Cc: sta...@kernel.org # .34.x drivers/virtio/virtio_ring.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b03214d559471359e2a85ae256686381d0672f29 Author: Michael S. Tsirkin Date: Wed Jun 23 22

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread Rusty Russell
On Tue, 22 Jun 2010 02:13:21 am Ryan Harper wrote: > * john cooper [2010-06-21 01:11]: > > Rusty Russell wrote: > > > On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: > > >> Create a new attribute for virtio-blk devices that will fetch the serial > > >>

Re: [PATCH for-2.6.35] virtio_net: fix oom handling on tx

2010-06-21 Thread Rusty Russell
On Mon, 21 Jun 2010 06:03:16 pm Michael S. Tsirkin wrote: > On Mon, Jun 21, 2010 at 12:13:49PM +0930, Rusty Russell wrote: > > - return NETDEV_TX_BUSY; > > + kfree_skb(skb); > > + return NETDEV_TX_OK; > > If we do so, let's increment

Re: [PATCH for-2.6.35] virtio_net: fix oom handling on tx

2010-06-20 Thread Rusty Russell
virtio net will never try to overflow the TX ring, so the only reason add_buf may fail is out of memory. Thus, we can not stop the device until some request completes - there's no guarantee anything at all is outstanding. Make the error message clearer as well: error here does not indicate que

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-20 Thread Rusty Russell
On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: > Create a new attribute for virtio-blk devices that will fetch the serial > number > of the block device. This attribute can be used by udev to create disk/by-id > symlinks for devices that don't have a UUID (filesystem) associated with them. >

Re: [PATCH 2/2] Remove virtio_blk VBID ioctl

2010-06-20 Thread Rusty Russell
On Sat, 19 Jun 2010 04:08:03 am Ryan Harper wrote: > With the availablility of a sysfs device attribute for examining disk serial > numbers the ioctl is no longer needed. The user-space changes for this aren't > upstream yet so we don't have any users to worry about. If John Cooper acks this, I'l

Re: [PATCH for-2.6.35] virtio_net: fix oom handling on tx

2010-06-14 Thread Rusty Russell
On Fri, 11 Jun 2010 04:33:43 am Michael S. Tsirkin wrote: > On Thu, Jun 10, 2010 at 10:46:53AM -0700, Stephen Hemminger wrote: > > It makes more sense to have the device increment tx_droppped, > > and return NETDEV_TX_OK. Skip the message (or make it a pr_debug()). > > Network devices do not guar

Re: [PATCH] virtio_net: indicate oom when addbuf returns failure

2010-06-06 Thread Rusty Russell
On Mon, 7 Jun 2010 07:54:41 am Herbert Xu wrote: > On Sun, Jun 06, 2010 at 11:13:00PM +0300, Michael S. Tsirkin wrote: > > > > Actually this code looks strange: > > Note that add_buf inicates out of memory > > condition with a positive return value, and ring full > > (which is not an error!) with -

Re: [PATCH] virtio_net: indicate oom when addbuf returns failure

2010-06-06 Thread Rusty Russell
On Mon, 7 Jun 2010 05:43:00 am Michael S. Tsirkin wrote: > On Fri, Jun 04, 2010 at 10:28:56AM +0930, Rusty Russell wrote: > > This patch is a subset of an already upstream patch, but this portion > > is useful in earlier releases. > > > > Please consider for the 2.6

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-04 Thread Rusty Russell
On Fri, 4 Jun 2010 09:12:05 pm Michael S. Tsirkin wrote: > On Fri, Jun 04, 2010 at 08:46:49PM +0930, Rusty Russell wrote: > > I'm uncomfortable with moving a field. > > > > We haven't done that before and I wonder what will break with old code. > >

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-04 Thread Rusty Russell
On Fri, 4 Jun 2010 08:05:43 pm Michael S. Tsirkin wrote: > On Fri, Jun 04, 2010 at 12:04:57PM +0930, Rusty Russell wrote: > > On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: > > > This adds an (unused) option to put available ring before control (avail > > &

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-03 Thread Rusty Russell
On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: > This adds an (unused) option to put available ring before control (avail > index, flags), and adds padding between index and flags. This avoids > cache line sharing between control and ring, and also makes it possible > to extend avail cont

Re: [PATCH 0/3][STABLE] KVM: Various issues in virtio_net

2010-06-03 Thread Rusty Russell
e last one and repost to net...@vger.kernel.org. Acked-by: Rusty Russell Cc: sta...@kernel.org Thanks! Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization

[PULL] virtio fixes

2010-06-03 Thread Rusty Russell
st one S/G element to operate properly, as does the block layer which increments it to one anyway. We hit this due to a qemu bug which advertises a sg_elements of 0 under some circumstances. Signed-off-by: Christoph Hellwig Signed-off-by: Rusty Russell (tweaked logic) dri

Re: [PATCH 2/2] virtio: console: Fix crash when port is unplugged and blocked for write

2010-05-31 Thread Rusty Russell
On Thu, 27 May 2010 05:24:40 pm Amit Shah wrote: > When a program that has a virtio port opened and blocked for a write > operation, a port hot-unplug event will later led to a crash when > SIGTERM was sent to the program. Fix that. > > Signed-off-by: Amit Shah Thanks, both applied. Cheers, Rus

Re: [PATCHv2-RFC 0/2] virtio: put last seen used index into ring itself

2010-05-31 Thread Rusty Russell
On Thu, 27 May 2010 05:20:35 am Michael S. Tsirkin wrote: > Here's a rewrite of the original patch with a new layout. > I haven't tested it yet so no idea how this performs, but > I think this addresses the cache bounce issue raised by Avi. > Posting for early flames/comments. Sorry, not without s

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-20 Thread Rusty Russell
On Thu, 20 May 2010 04:30:56 pm Avi Kivity wrote: > On 05/20/2010 08:01 AM, Rusty Russell wrote: > > > >> A device with out of order > >> completion (like virtio-blk) will quickly randomize the unused > >> descriptor indexes, so every descriptor fetch will req

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-19 Thread Rusty Russell
On Thu, 20 May 2010 02:31:50 pm Rusty Russell wrote: > On Wed, 19 May 2010 05:36:42 pm Avi Kivity wrote: > > > Note that this is a exclusive->shared->exclusive bounce only, too. > > > > > > > A bounce is a bounce. > > I tried to measure this to

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-19 Thread Rusty Russell
On Wed, 19 May 2010 05:36:42 pm Avi Kivity wrote: > > Note that this is a exclusive->shared->exclusive bounce only, too. > > > > A bounce is a bounce. I tried to measure this to show that you were wrong, but I was only able to show that you're right. How annoying. Test code below. > Virtio

Re: [PATCH] vhost-net: utilize PUBLISH_USED_IDX feature

2010-05-19 Thread Rusty Russell
On Thu, 20 May 2010 07:57:18 am Michael S. Tsirkin wrote: > On Wed, May 19, 2010 at 08:04:51PM +0300, Avi Kivity wrote: > > On 05/18/2010 04:19 AM, Michael S. Tsirkin wrote: > >> With PUBLISH_USED_IDX, guest tells us which used entries > >> it has consumed. This can be used to reduce the number > >

[PULL] virtio

2010-05-19 Thread Rusty Russell
virtqueue_xxx wrappers virtio: add_buf_gfp Rusty Russell (1): virtio_blk: remove multichar constant. john cooper (2): Add virtio disk identification support Add virtio disk identification ioctl drivers/block/virtio_blk.c | 46 +++- drivers/char/hw_random/v

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-19 Thread Rusty Russell
On Wed, 12 May 2010 04:57:22 am Avi Kivity wrote: > On 05/07/2010 06:23 AM, Rusty Russell wrote: > > On Thu, 6 May 2010 07:30:00 pm Avi Kivity wrote: > > > >> On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: > >> > >>> + /* We publish the las

Re: virtio: imply disable_cb on callbacks

2010-05-18 Thread Rusty Russell
On Tue, 18 May 2010 09:03:17 pm Michael S. Tsirkin wrote: > Rusty, the patch "virtio: imply disable_cb on callbacks" is on your tree. > I'd like to figure out how it works: for example: > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > --- a/drivers/block/virtio_blk.c > ++

Re: [PATCH 1/4] drivers/char: Eliminate use after free

2010-05-17 Thread Rusty Russell
On Mon, 17 May 2010 06:31:40 pm Amit Shah wrote: > On (Sat) May 15 2010 [11:45:53], Julia Lawall wrote: > > From: Julia Lawall ... > > Signed-off-by: Julia Lawall > > Acked-by: Amit Shah > > Thanks, Julia. > > Rusty, please pick this patch. Thanks. Done. Thanks! Rusty. _

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-10 Thread Rusty Russell
On Sun, 9 May 2010 06:27:33 pm Michael S. Tsirkin wrote: > On Fri, May 07, 2010 at 12:35:39PM +0930, Rusty Russell wrote: > > Then there's padding to page boundary. That puts us on a cacheline again > > for the used ring; also 2 bytes per entry. > > > > Hmm,

[PATCH] virtio: initialize earlier

2010-05-06 Thread Rusty Russell
From: Stijn Tintel Move initialization of the virtio framework before the initialization of mtd, so that block2mtd can be used on virtio-based block devices. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15644 Signed-off-by: Stijn Tintel Signed-off-by: Rusty Russell Cc: sta

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-06 Thread Rusty Russell
On Thu, 6 May 2010 03:49:46 pm Michael S. Tsirkin wrote: > Now, I also added an mb() in guest between read and write so > that last used index write can not get ahead of used index read. > It does feel good to have it there, but I can not say why > it's helpful. Works fine without it, but then thes

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-06 Thread Rusty Russell
On Thu, 6 May 2010 07:30:00 pm Avi Kivity wrote: > On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: > > + /* We publish the last-seen used index at the end of the available ring. > > +* It is at the end for backwards compatibility. */ > > + vr->last_used_idx =&(vr)->avail->ring[num]; > > +

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-06 Thread Rusty Russell
On Thu, 6 May 2010 03:57:55 pm Michael S. Tsirkin wrote: > On Thu, May 06, 2010 at 10:22:12AM +0930, Rusty Russell wrote: > > On Wed, 5 May 2010 03:52:36 am Michael S. Tsirkin wrote: > > > What do you think? > > > > I think everyone is settled on 128 byte cache lines

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 03:33:43 pm Neil Brown wrote: > On Wed, 5 May 2010 14:28:41 +0930 > Rusty Russell wrote: > > > On Wed, 5 May 2010 05:47:05 am Jamie Lokier wrote: > > > Jens Axboe wrote: > > > > On Tue, May 04 2010, Rusty Russell wrote: > > > >

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-05 Thread Rusty Russell
On Thu, 6 May 2010 06:28:14 am Michael S. Tsirkin wrote: > Rusty, > this is a simplified form of a patch you posted in the past. > I have a vhost patch that, using this feature, shows external > to host bandwidth grow from 5 to 7 GB/s, by avoiding > an interrupt in the window after previous interru

Re: [PATCH 0/3] virtio: console: Handle multiple console port resizes

2010-05-05 Thread Rusty Russell
On Thu, 6 May 2010 06:05:06 am Amit Shah wrote: > Hello, > > This series adds resize support for multiple console ports. The size > for each console is stored in its structure and the host informs the > guest about size changes via the VIRTIO_CONSOLE_RESIZE control > message. Thanks, applied! Ru

Re: question on virtio

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 08:39:47 pm Michael S. Tsirkin wrote: > Hi! > I see this in virtio_ring.c: > > /* Put entry in available array (but don't update avail->idx * > until they do sync). */ > > Why is it done this way? > It seems that updating the index straight away would be simple

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-05 Thread Rusty Russell
xpand: the ring is always a whole number > > of pages and there's hundreds of bytes of padding after the avail ring > > and the used ring, whatever the number of descriptors (which must be a > > power of 2). > > > > We add a feature bit so the guest can tell the h

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Rusty Russell
On Wed, 5 May 2010 05:47:05 am Jamie Lokier wrote: > Jens Axboe wrote: > > On Tue, May 04 2010, Rusty Russell wrote: > > > ISTR someone mentioning a desire for such an API years ago, so CC'ing the > > > usual I/O suspects... > > > > It would be nice

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Rusty Russell
On Wed, 5 May 2010 04:24:59 am Christoph Hellwig wrote: > On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: > > I took a stub at documenting CMD and FLUSH request types in virtio > > block. Christoph, could you look over this please? > > > > I note that the interface seems full

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-03 Thread Rusty Russell
On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: > I took a stub at documenting CMD and FLUSH request types in virtio > block. Christoph, could you look over this please? > > I note that the interface seems full of warts to me, > this might be a first step to cleaning them. ISTR Christo

[PATCH] virtio: Fix GFP flags passed from the virtio balloon driver

2010-04-21 Thread Rusty Russell
we retry after sometime anyway. Signed-off-by: Balbir Singh Signed-off-by: Rusty Russell Cc: kvm Cc: sta...@kernel.org --- drivers/virtio/virtio_balloon.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c

Re: [PATCH] trans_virtio: use virtqueue_xxx wrappers

2010-04-20 Thread Rusty Russell
On Tue, 13 Apr 2010 10:41:50 pm Michael S. Tsirkin wrote: > Switch trans_virtio to new virtqueue_xxx wrappers. Thanks, I've applied all these. Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-f

<    5   6   7   8   9   10   11   12   13   14   >