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

2010-04-21 Thread Rusty Russell
if allocation fails, since we retry after sometime anyway. Signed-off-by: Balbir Singh bal...@linux.vnet.ibm.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au Cc: kvm kvm@vger.kernel.org Cc: sta...@kernel.org --- drivers/virtio/virtio_balloon.c |3 ++- 1 files changed, 2 insertions(+), 1

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 Christoph

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 to have a more fuller API for this, but the reality

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 of warts

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

2010-05-05 Thread Rusty Russell
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 host that it's writing out the current value there, if it wants to use that. Signed-off-by: Rusty Russell ru...@rustcorp.com.au

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 simpler, while

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 interrupt

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

2010-05-06 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 ru...@rustcorp.com.au wrote: 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

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 for the forseeable future, so it's

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]; + /* Verify

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 these

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, is used ring really 2 bytes per entry? Err

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: [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 last-seen used index at the end of the available ring

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 of

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 is

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 show that you were wrong, but I was only able to show

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 require a bounce. In contrast, if the rings hold

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 some

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 control

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 index, flags), and adds padding between

Re: Extending virtio_console to support multiple ports

2009-09-20 Thread Rusty Russell
On Tue, 1 Sep 2009 02:07:05 am Anthony Liguori wrote: Amit Shah wrote: Functionally speaking, both virtio-console and virtio-serial do the same thing. In fact, virtio-console is just a subset of virtio-serial. If there are problems converging the two drivers in Linux, then I suggest you

Re: [RFC] Virtual Machine Device Queues(VMDq) support on KVM

2009-09-21 Thread Rusty Russell
On Wed, 2 Sep 2009 01:35:18 am Stephen Hemminger wrote: On Tue, 1 Sep 2009 14:58:19 +0800 Xin, Xiaohui xiaohui@intel.com wrote: [RFC] Virtual Machine Device Queues (VMDq) support on KVM Network adapter with VMDq technology presents multiple pairs of tx/rx queues,

Re: [PATCH] virtio-blk: set QUEUE_ORDERED_DRAIN by default

2009-09-22 Thread Rusty Russell
On Fri, 18 Sep 2009 03:01:42 am Christoph Hellwig wrote: Err, I'll take this one back for now pending some more discussion. What we need more urgently is the writeback cache flag, which is now implemented in qemu, patch following ASAP. OK, still catching up on mail. I'll push them out of the

Re: [PATCH 1/1] virtio: adding __devexit to virtballoon_remove

2009-10-13 Thread Rusty Russell
Thanks, I already have this from Uwe. Cheers, Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv2] virtio: order used ring after used index read

2009-10-25 Thread Rusty Russell
On Sun, 25 Oct 2009 11:58:53 pm Michael S. Tsirkin wrote: On SMP guests, reads from the ring might bypass used index reads. This causes guest crashes because host writes to used index to signal ring data readiness. Fix this by inserting rmb before used ring reads. Thanks, good spotting.

Re: [PATCH] virtio-net: fix data corruption with OOM

2009-10-25 Thread Rusty Russell
this. This causes guest data corruption and crashes with vhost since net core can requeue the skb or free it without it being taken off the list. This patch fixes this by queueing the skb after successful transmit. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Rusty Russell ru

Re: performance regression in virtio-net in 2.6.32-rc4

2009-10-27 Thread Rusty Russell
On Tue, 27 Oct 2009 05:18:35 am Michael S. Tsirkin wrote: Hi! I noticed a performance regression in virtio net: going from 2.6.31 to 2.6.32-rc4 I see this, for guest to host communication: ... Size SizeSize Time Throughput bytes bytes bytessecs.10^6bits/sec 87380

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-05 Thread Rusty Russell
On Thu, 5 Nov 2009 02:27:24 am Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Hi Michael, Now everyone else has finally kicked all the tires and it seems to pass, I've done a fairly

Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server

2009-11-05 Thread Rusty Russell
On Thu, 5 Nov 2009 03:55:42 am Paul E. McKenney wrote: On Wed, Nov 04, 2009 at 01:57:29PM +0200, Michael S. Tsirkin wrote: Can you ack this usage please? I thought I had done so in my paragraph above, but if you would like something a bit more formal... snip verbose super-ack with

Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server

2009-11-07 Thread Rusty Russell
On Sat, 7 Nov 2009 03:00:07 am Paul E. McKenney wrote: On Fri, Nov 06, 2009 at 03:31:20PM +1030, Rusty Russell wrote: But it's still nasty to use half an API. If it were a few places I would have open-coded it with a comment, or wrapped it. As it is, I don't think that would be a win

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-08 Thread Rusty Russell
On Sun, 8 Nov 2009 10:05:16 pm Michael S. Tsirkin wrote: On Fri, Nov 06, 2009 at 03:29:17PM +1030, Rusty Russell wrote: +/* Caller must have TX VQ lock */ +static void tx_poll_stop(struct vhost_net *net) +{ + if (likely(net-tx_poll_state != VHOST_NET_POLL_STARTED)) + return

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
On Mon, 9 Nov 2009 05:40:32 pm Michael S. Tsirkin wrote: On Mon, Nov 9, 2009 at 8:17 AM, Rusty Russell ru...@rustcorp.com.au wrote: There's something about the 'acked' which rubs me the wrong way. enabled_features is perhaps a better term than acked_features; acked seems more a user point

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
On Tue, 10 Nov 2009 03:52:30 am Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. Thanks, applied. Will be in tomorrow's

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
One fix: vhost: fix TUN=m VHOST_NET=y drivers/built-in.o: In function `get_tun_socket': net.c:(.text+0x15436e): undefined reference to `tun_get_socket' Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/vhost/Kconfig |2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-11 Thread Rusty Russell
On Tue, 10 Nov 2009 10:06:37 pm Michael S. Tsirkin wrote: If tun is a module, vhost must be a module, too. If tun is built-in or disabled, vhost can be built-in. I really like the brainbending :) Keeps readers on their toes... Applied, Rusty. -- To unsubscribe from this list: send the line

Re: [PATCH 3/3] Split the KVM pv-ops support by feature

2009-11-17 Thread Rusty Russell
On Wed, 18 Nov 2009 10:43:12 am Alexander Graf wrote: Currently selecting KVM guest support enabled multiple features at once that not everyone necessarily wants to have, namely: These patches make perfect sense, but please make sure Jeremy Fitzhardinge (CC'd) is in the loop, as he split the

Re: [PATCH 0/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-11-22 Thread Rusty Russell
On Fri, 20 Nov 2009 04:39:19 pm Shirley Ma wrote: Guest virtio_net receives packets from its pre-allocated vring buffers, then it delivers these packets to upper layer protocols as skb buffs. So it's not necessary to pre-allocate skb for each mergable buffer, then frees it when it's useless.

Re: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-11-22 Thread Rusty Russell
On Sat, 21 Nov 2009 02:51:41 am Shirley Ma wrote: Signed-off-by: Shirley Ma (x...@us.ibm.com) Hi Shirley, This patch seems like a good idea, but it needs some work. As this is the first time I've received a patch from you, I will go through it in extra detail. (As virtio maintainer, it's

Re: [PATCH] vhost: Fix warnings and bad type handling

2009-11-22 Thread Rusty Russell
On Sun, 22 Nov 2009 08:58:01 pm Michael S. Tsirkin wrote: From: Alan Cox a...@linux.intel.com Subject: [PATCH] vhost: fix warnings on 32 bit systems Fix compiler warning about discarding top 32 bit of data on 32 bit systems, and document that dicarded bits must be 0. Signed-off-by:

Re: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-11-23 Thread Rusty Russell
On Tue, 24 Nov 2009 02:37:01 am Shirley Ma wrote: + skb = (struct sk_buff *)buf; This cast is unnecessary, but a comment would be nice: Without this cast there is a compile warning. Hi Shirley, Looks like buf is a void *, so no cast should be necessary. But I could be

Re: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-11-24 Thread Rusty Russell
On Wed, 25 Nov 2009 01:06:32 am Anthony Liguori wrote: So does lguest. It's been that way since the beginning. Fixing this would result in breaking older guests. Agreed, we can't fix it in the guests, but it's a wart. That's why I haven't bothered fixing it, but if someone else wants to

Re: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-11-25 Thread Rusty Russell
On Wed, 25 Nov 2009 07:45:30 pm Michael S. Tsirkin wrote: Hmm, is it really worth it to save a header copy if it's linear? We are going to access it anyway, and it fits into one cacheline nicely. On the other hand we have more code making life harder for compiler and processor. Not sure: I

Re: [PATCH] virtio: set pci bus master enable bit

2009-11-30 Thread Rusty Russell
On Mon, 30 Nov 2009 02:22:01 am Michael S. Tsirkin wrote: As all virtio devices perform DMA, we must enable bus mastering for them to be spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_pci.c |1 + 1 files changed, 1 insertions(+), 0

Re: [PATCH] virtio spec: add virtio-blk max sectors feature

2009-12-07 Thread Rusty Russell
On Thu, 3 Dec 2009 08:28:38 pm Avi Kivity wrote: On 12/03/2009 10:42 AM, Avishay Traeger1 wrote: I previously submitted a patch to have the guest virtio-blk driver get the value for the maximum I/O size from the host bdrv, rather than assume that there is no limit. Avi requested that I

Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-13 Thread Rusty Russell
On Fri, 11 Dec 2009 11:03:25 pm Shirley Ma wrote: Signed-off-by: x...@us.ibm.com Hi Shirley, These patches look quite close. More review to follow :) This title needs revision. It should start with virtio: (all the virtio patches do, for easy identification after merge), eg:

Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-13 Thread Rusty Russell
On Fri, 11 Dec 2009 11:13:02 pm Shirley Ma wrote: Signed-off-by: Shirley Ma x...@us.ibm.com I don't think there's a good way of splitting this change across multiple patches. And I don't think this patch will compile; I don't think we can get rid of trim_pages yet. We *could* first split the

Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-15 Thread Rusty Russell
On Wed, 16 Dec 2009 09:10:02 am Michael S. Tsirkin wrote: On Wed, Dec 16, 2009 at 09:06:12AM +1030, Rusty Russell wrote: On Tue, 15 Dec 2009 06:52:53 am Michael S. Tsirkin wrote: On Mon, Dec 14, 2009 at 12:08:05PM -0800, Shirley Ma wrote: Hello Michael, I agree with the comments

Re: [PATCH] vhost: fix high 32 bit in FEATURES ioctls

2009-12-22 Thread Rusty Russell
On Tue, 22 Dec 2009 10:09:33 pm Michael S. Tsirkin wrote: From: David Stevens dlstev...@us.ibm.com Subject: vhost: fix high 32 bit in FEATURES ioctls Thanks, applied. Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

Re: [PATCH/RFC] virtio_blk: check for hardsector size from host

2008-05-29 Thread Rusty Russell
On Tuesday 27 May 2008 19:04:59 Christian Borntraeger wrote: Rusty, Jens, I need your opinion on the following patch. It seems to work, but I would like to get some feedback if this patch is the right approach: Looks like the right approach to me. Don't know about the block side of it...

Re: [PATCH] virtio_config: fix len calculation of config elements

2008-05-29 Thread Rusty Russell
On Thursday 29 May 2008 19:08:01 Christian Borntraeger wrote: v is a pointer, to we have to use sizeof(*v) instead of sizeof(v). How embarassing. Applied, thanks. Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo

Re: [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies

2008-06-17 Thread Rusty Russell
On Tuesday 17 June 2008 00:02:55 Anthony Liguori wrote: There's nothing that prevents zero-copy to be implemented for tun without vringfd. In fact, I seem to recall that your earlier patches implemented zero-copy :-) They didn't actually work. You need to block until the data isn't being

Re: [PATCH 3/9] kvm: qemu: Remove virtio_net tx ring-full heuristic

2008-07-24 Thread Rusty Russell
On Friday 25 July 2008 09:22:53 Dor Laor wrote: Mark McLoughlin wrote: vq-vring.used-flags = ~VRING_USED_F_NO_NOTIFY; qemu_del_timer(n-tx_timer); n-tx_timer_active = 0; As stated by newer messages, we should handle the first tx notification if the timer wasn't active to

Re: [PATCH 0/9][RFC] KVM virtio_net performance

2008-07-27 Thread Rusty Russell
On Saturday 26 July 2008 19:45:36 Avi Kivity wrote: Mark McLoughlin wrote: Hey, Here's a bunch of patches attempting to improve the performance of virtio_net. This is more an RFC rather than a patch submission since, as can be seen below, not all patches actually improve the

Re: [PATCH 0/9][RFC] KVM virtio_net performance

2008-07-27 Thread Rusty Russell
On Saturday 26 July 2008 19:45:36 Avi Kivity wrote: 5) Eliminating an extra copy on the host-guest path only makes a barely measurable difference. That's expected on a host-guest test. Zero copy is mostly important for guest-external, and with zerocopy already enabled in the guest

Re: [PATCH] Work around dhclient brokenness

2008-08-18 Thread Rusty Russell
On Monday 18 August 2008 21:44:25 Herbert Xu wrote: On Mon, Aug 18, 2008 at 02:40:55PM +0300, Avi Kivity wrote: Isn't that turned on automatically for real hardware? And what's to prevent a broken dhclient together with the (presumably) hacked up initscripts that call ethtool? Well the

Re: [PATCH] Work around dhclient brokenness

2008-08-18 Thread Rusty Russell
On Tuesday 19 August 2008 13:17:57 Chris Wedgwood wrote: On Tue, Aug 19, 2008 at 10:45:20AM +1000, Rusty Russell wrote: For those not following closely: We already have a method for the guest to accept or reject features. Our problem is that the guest is already accepting the CSUM feature

Re: [PATCH] Work around dhclient brokenness

2008-08-19 Thread Rusty Russell
On Tuesday 19 August 2008 15:17:08 Herbert Xu wrote: On Mon, Aug 18, 2008 at 10:13:55PM -0700, Chris Wedgwood wrote: CSUM2 sounds so ugly though. Features seem to get added and never removed how about if this had a documented short lifetime (if it really must go in)? All we need is

Re: [PATCH] Work around dhclient brokenness

2008-08-19 Thread Rusty Russell
On Tuesday 19 August 2008 15:28:40 Chris Wedgwood wrote: On Tue, Aug 19, 2008 at 03:17:08PM +1000, Herbert Xu wrote: All we need is a simple toggle to disable checksum offload. Every NIC that offers receive checksum offload allows it to be disabled. virtio shouldn't be any different. So

Re: [PATCH] Work around dhclient brokenness

2008-08-24 Thread Rusty Russell
On Wednesday 20 August 2008 01:05:55 Chris Wedgwood wrote: On Tue, Aug 19, 2008 at 07:10:44PM +1000, Rusty Russell wrote: We need both. CSUM2 is the new virtio-level feature. Perhaps that's what I'm misisng. How is this different to CSUM? Because current guests which say they can handle

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-12 Thread Rusty Russell
On Tuesday 11 November 2008 10:07:09 Hollis Blanchard wrote: Both sides of the virtio interface must agree about how big a pfn really is. This is particularly an issue on architectures where the page size is configurable (e.g. PowerPC, IA64) -- the interface must be independent of PAGE_SHIFT.

[PATCH 4/7] virtio: use LGUEST_VRING_ALIGN instead of relying on pagesize

2008-11-12 Thread Rusty Russell
This doesn't really matter, since lguest is i386 only at the moment, but we could actually choose a different value. (lguest doesn't have a guarenteed ABI). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- Documentation/lguest/lguest.c |6 +++--- drivers/lguest/lguest_device.c |2

[PATCH 2/7] virtio: rename 'pagesize' arg to vring_init/vring_size

2008-11-12 Thread Rusty Russell
It's really the alignment desired for consumer/producer separation; historically this x86 pagesize, but with PowerPC it'll still be x86 pagesize. And in theory lguest could choose a different value. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- include/linux/virtio_ring.h | 12

[PATCH 3/7] virtio: Don't use PAGE_SIZE for vring alignment in virtio_pci.

2008-11-12 Thread Rusty Russell
That doesn't work for non-4k guests which are now appearing. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/virtio/virtio_pci.c |5 +++-- include/linux/virtio_pci.h |4 2 files changed, 7 insertions(+), 2 deletions(-) diff -r c6f6a3ab173b drivers/virtio/virtio_pci.c

[PATCH 5/7] virtio: use KVM_S390_VIRTIO_RING_ALIGN instead of relying on pagesize

2008-11-12 Thread Rusty Russell
This doesn't really matter, since s390 pagesize is 4k anyway. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- arch/s390/include/asm/kvm_virtio.h |3 +++ drivers/s390/kvm/kvm_virtio.c |9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff -r 5c9c0cc58458 arch/s390

[PATCH 6/7] virtio: hand virtio ring alignment as argument to vring_new_virtqueue

2008-11-12 Thread Rusty Russell
This allows each virtio user to hand in the alignment appropriate to their virtio_ring structures. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/lguest/lguest_device.c |4 ++-- drivers/s390/kvm/kvm_virtio.c |3 ++- drivers/virtio/virtio_pci.c|4 ++-- drivers/virtio

[PATCH 7/7] lguest: change virtio ring alignment.

2008-11-12 Thread Rusty Russell
This is just to test that the constant is wired through correctly. lguest has no ABI so I could apply this patch, but it breaks the don't be an asshole rule. diff -r 19e5f3f3a4be Documentation/lguest/Makefile --- a/Documentation/lguest/Makefile Wed Nov 12 22:27:50 2008 +1030 +++

[PATCH 1/7] virtio: Don't use PAGE_SIZE in virtio_pci.c

2008-11-12 Thread Rusty Russell
The virtio PCI devices don't depend on the guest page size. This matters now PowerPC virtio is gaining ground (they like 64k pages). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/virtio/virtio_pci.c |2 +- include/linux/virtio_pci.h |4 2 files changed, 5 insertions

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-12 Thread Rusty Russell
On Thursday 13 November 2008 02:46:31 Hollis Blanchard wrote: On Wed, 2008-11-12 at 22:51 +1030, Rusty Russell wrote: On Tuesday 11 November 2008 10:07:09 Hollis Blanchard wrote: Both sides of the virtio interface must agree about how big a pfn really is. This is particularly an issue

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-13 Thread Rusty Russell
On Friday 14 November 2008 08:18:33 Hollis Blanchard wrote: On Thu, 2008-11-13 at 08:44 +1030, Rusty Russell wrote: Note that I still don't have a balloon patch: want to send me one? linux: virtio-balloon: avoid implicit use of Linux page size in balloon interface Thanks, applied

Re: [PATCH 2/2] kvm-s390: implement config_changed for virtio on s390

2008-11-18 Thread Rusty Russell
On Wednesday 19 November 2008 08:14:13 Christian Borntraeger wrote: Can you replace the kvm-s390 patch with this one? Done. I hadn't pushed out the other one to linux-next yet anyway. Cheers, Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [BUG] virtio-pci queue allocation not page-aligned

2008-12-02 Thread Rusty Russell
On Wednesday 03 December 2008 05:38:21 Hollis Blanchard wrote: I just spent a number of hours tracking this one down, and I'm not too thrilled about it. vp_find_vq() does the memory allocation for virtio PCI rings, and it uses kzalloc() to do it. This is bad because the ring memory *must* be

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-05 Thread Rusty Russell
On Thursday 04 December 2008 23:14:31 Mark McLoughlin wrote: Nothing takes a ref on virtio_pci, so even if you have devices in use, rmmod will attempt to unload the module. Fix by simply making each device take a ref on the module. Hi Mark, Taking a reference to oneself is almost always

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-07 Thread Rusty Russell
On Saturday 06 December 2008 01:37:06 Mark McLoughlin wrote: Another example of a lack of an explicit dependency causing problems is Fedora's mkinitrd having this hack: if echo $PWD | grep -q /virtio-pci/ ; then findmodule virtio_pci fi which basically says if this is a

Re: [PATCH 2/2] kvm: use cpumask_var_t for cpus_hardware_enabled

2008-12-07 Thread Rusty Russell
On Monday 08 December 2008 02:25:50 Avi Kivity wrote: Rusty Russell wrote: This changes cpus_hardware_enabled from a cpumask_t to a cpumask_var_t: equivalent for CONFIG_CPUMASKS_OFFSTACK=n, otherwise dynamically allocated. -static cpumask_t cpus_hardware_enabled; +static

Re: [PATCH 1/2] kvm: use modern cpumask primitives, no cpumask_t on stack

2008-12-07 Thread Rusty Russell
On Monday 08 December 2008 02:44:00 Avi Kivity wrote: Avi Kivity wrote: Rusty Russell wrote: We're getting rid on on-stack cpumasks for large NR_CPUS. 1) Use cpumask_var_t and alloc_cpumask_var (a noop normally). Fallback code is inefficient but never happens in practice. Wow

[PATCH] kvm: Extract core of kvm_flush_remote_tlbs/kvm_reload_remote_mmus.

2008-12-08 Thread Rusty Russell
Avi said: Wow, code duplication from Rusty. Things must be bad. Something about glass houses comes to mind. But instead, a patch. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 44 +++- 1 file changed, 15 insertions(+), 29

Re: [PATCH 1/2] kvm: use modern cpumask primitives, no cpumask_t on stack

2008-12-08 Thread Rusty Russell
On Monday 08 December 2008 20:19:57 Avi Kivity wrote: Rusty Russell wrote: Btw, for the general case, instead of forcing everyone to duplicate, how about: cpumask_var_t cpus; with_cpumask(cpus) { ... code to populate cpus smp_call_function_some(...); } end_with_cpumask

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Rusty Russell
On Wednesday 10 December 2008 08:02:14 Anthony Liguori wrote: Mark McLoughlin wrote: Allow the host to inform us that the link is down by adding a VIRTIO_NET_F_STATUS which indicates that device status is available in virtio_net config. This is currently useful for simulating link down

Re: [PATCH] virtio_net: add link status handling

2008-12-09 Thread Rusty Russell
On Tuesday 09 December 2008 20:49:33 Mark McLoughlin wrote: Allow the host to inform us that the link is down by adding a VIRTIO_NET_F_STATUS which indicates that device status is available in virtio_net config. This has been a TODO for a while, thanks! + if (vi-status == v) +

Re: [PATCH] virtio_net: add link status handling

2008-12-12 Thread Rusty Russell
On Thursday 11 December 2008 05:04:44 Mark McLoughlin wrote: On Tue, 2008-12-09 at 21:11 -0600, Anthony Liguori wrote: Rusty Russell wrote: On Wednesday 10 December 2008 08:02:14 Anthony Liguori wrote: It would be nice if the virtio-net card wrote some acknowledgement that it has

Re: [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack

2008-12-15 Thread Rusty Russell
/kvm_main.c:380: error: implicit declaration of function 'smp_call_function_many' Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -146,6 +147,8 @@ static inline void smp_send_reschedule(i

[PATCH] Define smp_call_function_many for UP

2008-12-18 Thread Rusty Russell
'smp_call_function_many' Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- include/linux/smp.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -146,6 +147,8 @@ static inline void smp_send_reschedule(i

Re: [PATCH] Define smp_call_function_many for UP

2008-12-21 Thread Rusty Russell
On Saturday 20 December 2008 03:33:26 Linus Torvalds wrote: Christmas at Rusty's house: Dreary. Far from! Sure, it's Arabella's first Xmas, but a Very Kernel Christmas can be lots of fun. Why just this morning, we did this together! See if you can tell which bits are hers... Subject:

Re: Network performance with small packets

2011-02-08 Thread Rusty Russell
to know exactly what the ring looks like. This patch adds stats indexed by how-full-ring-is; we could extend it to also record them by how-used-ring-is if we need. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig --- a/drivers/virtio

Re: Network performance with small packets

2011-02-08 Thread Rusty Russell
On Wed, 9 Feb 2011 11:23:45 am Michael S. Tsirkin wrote: On Wed, Feb 09, 2011 at 11:07:20AM +1030, Rusty Russell wrote: On Wed, 2 Feb 2011 03:12:22 pm Michael S. Tsirkin wrote: On Wed, Feb 02, 2011 at 10:09:18AM +0530, Krishna Kumar2 wrote: Michael S. Tsirkin m...@redhat.com 02/02/2011

Re: Network performance with small packets

2011-03-10 Thread Rusty Russell
On Tue, 08 Mar 2011 20:21:18 -0600, Andrew Theurer haban...@linux.vnet.ibm.com wrote: On Tue, 2011-03-08 at 13:57 -0800, Shirley Ma wrote: On Wed, 2011-02-09 at 11:07 +1030, Rusty Russell wrote: I've finally read this thread... I think we need to get more serious with our stats gathering

Re: TX from KVM guest virtio_net to vhost issues

2011-03-10 Thread Rusty Russell
On Wed, 09 Mar 2011 13:46:36 -0800, Shirley Ma mashi...@us.ibm.com wrote: Since we have lots of performance discussions about virtio_net and vhost communication. I think it's better to have a common understandings of the code first, then we can seek the right directions to improve it. We also

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-17 Thread Rusty Russell
On Wed, 16 Mar 2011 17:12:55 -0700, Shirley Ma mashi...@us.ibm.com wrote: Signed-off-by: Shirley Ma x...@us.ibm.com This is fascinating... and deeply weird. OK, what's the difference between calling xmit_skb and ignoring failure, and this patch which figures out it's going to fail before

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-23 Thread Rusty Russell
On Tue, 22 Mar 2011 13:36:50 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 21, 2011 at 11:03:07AM -0700, Shirley Ma wrote: On Fri, 2011-03-18 at 18:41 -0700, Shirley Ma wrote: + /* Drop packet instead of stop queue for better performance */ I would

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-23 Thread Rusty Russell
With simply removing the notify here, it does help the case when TX overrun hits too often, for example for 1K message size, the single TCP_STREAM performance improved from 2.xGb/s to 4.xGb/s. OK, we'll be getting rid of the kick on full, so please delete that on all benchmarks. Now, does the

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-25 Thread Rusty Russell
On Thu, 24 Mar 2011 10:46:49 -0700, Shirley Ma mashi...@us.ibm.com wrote: On Thu, 2011-03-24 at 16:28 +0200, Michael S. Tsirkin wrote: Several other things I am looking at, wellcome cooperation: 1. It's probably a good idea to update avail index immediately instead of upon kick: for RX

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-25 Thread Rusty Russell
On Thu, 24 Mar 2011 16:28:22 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 24, 2011 at 11:00:53AM +1030, Rusty Russell wrote: With simply removing the notify here, it does help the case when TX overrun hits too often, for example for 1K message size, the single TCP_STREAM

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-04-04 Thread Rusty Russell
On Sun, 27 Mar 2011 09:52:54 +0200, Michael S. Tsirkin m...@redhat.com wrote: Though IIRC, qemu's virtio barfs if the first descriptor isn't just the hdr (barf...). Maybe we can try fixing this before adding more flags, then e.g. publish used flag can be resued to also tell us layout is

Re: [PATCH 2/4] [RFC rev2] virtio-net changes

2011-04-12 Thread Rusty Russell
On Tue, 05 Apr 2011 20:38:52 +0530, Krishna Kumar krkum...@in.ibm.com wrote: Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with the old qemu since the last element is not accessed unless qemu sets VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar

Re: Network performance with small packets

2011-04-14 Thread Rusty Russell
On Tue, 12 Apr 2011 23:01:12 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 10, 2011 at 12:19:42PM +1030, Rusty Russell wrote: Here's an old patch where I played with implementing this: ... virtio: put last_used and last_avail index into ring itself. Generally

Re: Network performance with small packets

2011-04-18 Thread Rusty Russell
On Thu, 14 Apr 2011 19:03:59 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Apr 14, 2011 at 08:58:41PM +0930, Rusty Russell wrote: They have to offer the feature, so if the have some way of allocating non-page-aligned amounts of memory, they'll have to add those extra 2 bytes

Re: [PATCH] virtio_blk: support barriers without FLUSH feature

2010-06-15 Thread Rusty Russell
On Tue, 15 Jun 2010 10:13:48 pm Christoph Hellwig wrote: If we want to support barriers with the cache=writethrough mode in qemu we need to tell the block layer that we only need queue drains to implement a barrier. Follow the model set by SCSI and IDE and assume that there is no volatile

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'll

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.

  1   2   3   4   5   6   7   >