Re: [PATCH] slow_map: minor improvements to ROM BAR handling

2009-12-22 Thread Michael S. Tsirkin
On Tue, Dec 22, 2009 at 02:34:42PM +0100, Alexander Graf wrote: Michael S. Tsirkin wrote: On Tue, Dec 22, 2009 at 01:05:23PM +0100, Alexander Graf wrote: Michael S. Tsirkin wrote: ROM BAR can be handled same as regular BAR: load_option_roms utility will take care of copying

Re: [PATCH] slow_map: minor improvements to ROM BAR handling

2009-12-22 Thread Michael S. Tsirkin
On Tue, Dec 22, 2009 at 05:00:52PM +0100, Alexander Graf wrote: Avi Kivity wrote: On 12/22/2009 05:41 PM, Alexander Graf wrote: We could certainly extend emulate.c to fetch instruction bytes from userspace. It uses -read_std() now, so we'd need to switch to -read_emulated() and add

[PATCHv2] slow_map: minor improvements to ROM BAR handling

2009-12-23 Thread Michael S. Tsirkin
ROM BAR can be handled same as regular BAR: load_option_roms utility will take care of copying it to RAM as appropriate. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: made ROM BAR read-only. hw/device-assignment.c | 23 +++ 1 files changed, 11

Re: [PATCH] slow_map: minor improvements to ROM BAR handling

2009-12-23 Thread Michael S. Tsirkin
On Tue, Dec 22, 2009 at 05:39:22PM +0200, Avi Kivity wrote: On 12/22/2009 05:36 PM, Alexander Graf wrote: Is there a way to trap this and fprintf something? I don't think so. KVM will just trap on execution outside of RAM and either fail badly or throw something bad into the guest.

[PATCHv3] slow_map: minor improvements to ROM BAR handling

2009-12-23 Thread Michael S. Tsirkin
ROM BAR can be handled same as regular BAR: load_option_roms utility will take care of copying it to RAM as appropriate. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v2: replace ?: with an if statement changes from v1: make ROM bar read only hw/device

[PATCH] vhost: access check thinko fixes

2009-12-23 Thread Michael S. Tsirkin
it needs to increase log size with realloc, which might move the log address. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Rusty, this needs to be applied on top of the access_ok patch. If you want me to rool it in with that one and esend, let me know please. Thanks! drivers/vhost

Re: [PATCH] vhost-net: defer f-private_data until setup succeeds

2009-12-23 Thread Michael S. Tsirkin
scope (sure, true only after fd_install). Signed-off-by: Chris Wright chr...@redhat.com Acked-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

Re: [GIT PULL] AlacrityVM guest drivers for 2.6.33

2009-12-24 Thread Michael S. Tsirkin
On Wed, Dec 23, 2009 at 11:28:08AM -0800, Ira W. Snyder wrote: On Wed, Dec 23, 2009 at 12:34:44PM -0500, Gregory Haskins wrote: On 12/23/09 1:15 AM, Kyle Moffett wrote: On Tue, Dec 22, 2009 at 12:36, Gregory Haskins gregory.hask...@gmail.com wrote: On 12/22/09 2:57 AM, Ingo Molnar

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 09:48:34AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote: When built with rcu checks enabled, vhost triggers bogus warnings as vhost features are read without dev-mutex sometimes. Fixing it properly is not trivial

[PATCHv2] vhost: rcu annotation fixup

2011-01-18 Thread Michael S. Tsirkin
the checks for now. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: add TODO, fix more warnings. drivers/vhost/net.c |9 + drivers/vhost/vhost.h |6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 11:02:33AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011 at 07:55:00PM +0200, Michael S. Tsirkin wrote: On Tue, Jan 18, 2011 at 09:48:34AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote: When built with rcu

Re: Flow Control and Port Mirroring Revisited

2011-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 11:41:22AM -0800, Rick Jones wrote: So it won't be all that simple to implement well, and before we try, I'd like to know whether there are applications that are helped by it. For example, we could try to measure latency at various pps and see whether the backpressure

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Michael S. Tsirkin
On Wed, Jan 19, 2011 at 12:40:40AM +, Mel Gorman wrote: On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote: When built with rcu checks enabled, vhost triggers bogus warnings as vhost features are read without dev-mutex sometimes. Fixing it properly is not trivial

[PATCH] vhost: force vhost off for non-MSI guests

2011-01-20 Thread Michael S. Tsirkin
, for now disable vhost-net in these configurations. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- I need to report some error from virtio-pci that would be handled specially (disable but don't report an error) so I wanted one that's never likely to be used by a userspace ioctl. I selected

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-20 Thread Michael S. Tsirkin
On Thu, Jan 20, 2011 at 09:43:57AM -0600, Anthony Liguori wrote: On 01/20/2011 09:35 AM, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than

Re: [PATCH] vhost: force vhost off for non-MSI guests

2011-01-20 Thread Michael S. Tsirkin
On Thu, Jan 20, 2011 at 08:31:53AM -0800, Sridhar Samudrala wrote: On Thu, 2011-01-20 at 17:35 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-21 Thread Michael S. Tsirkin
On Thu, Jan 20, 2011 at 06:23:36PM -0600, Anthony Liguori wrote: On 01/20/2011 10:07 AM, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 09:43:57AM -0600, Anthony Liguori wrote: On 01/20/2011 09:35 AM, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-21 Thread Michael S. Tsirkin
On Thu, Jan 20, 2011 at 06:35:46PM -0700, Alex Williamson wrote: On Thu, 2011-01-20 at 18:23 -0600, Anthony Liguori wrote: On 01/20/2011 10:07 AM, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 09:43:57AM -0600, Anthony Liguori wrote: On 01/20/2011 09:35 AM, Michael S. Tsirkin

Re: Flow Control and Port Mirroring Revisited

2011-01-21 Thread Michael S. Tsirkin
On Thu, Jan 20, 2011 at 05:38:33PM +0900, Simon Horman wrote: [ Trimmed Eric from CC list as vger was complaining that it is too long ] On Tue, Jan 18, 2011 at 11:41:22AM -0800, Rick Jones wrote: So it won't be all that simple to implement well, and before we try, I'd like to know whether

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-21 Thread Michael S. Tsirkin
On Fri, Jan 21, 2011 at 06:19:13AM -0700, Alex Williamson wrote: On Fri, 2011-01-21 at 11:55 +0200, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 06:35:46PM -0700, Alex Williamson wrote: On Thu, 2011-01-20 at 18:23 -0600, Anthony Liguori wrote: On 01/20/2011 10:07 AM, Michael S

Re: Flow Control and Port Mirroring Revisited

2011-01-22 Thread Michael S. Tsirkin
On Sat, Jan 22, 2011 at 10:11:52AM +1100, Simon Horman wrote: On Fri, Jan 21, 2011 at 11:59:30AM +0200, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 05:38:33PM +0900, Simon Horman wrote: [ Trimmed Eric from CC list as vger was complaining that it is too long ] On Tue, Jan 18

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-22 Thread Michael S. Tsirkin
On Fri, Jan 21, 2011 at 04:48:02PM -0700, Alex Williamson wrote: When doing device assignment, we use cpu_register_physical_memory() to directly map the qemu mmap of the device resource into the address space of the guest. The unadvertised feature of the register physical memory code path on

Re: Flow Control and Port Mirroring Revisited

2011-01-23 Thread Michael S. Tsirkin
On Sun, Jan 23, 2011 at 05:38:49PM +1100, Simon Horman wrote: On Sat, Jan 22, 2011 at 11:57:42PM +0200, Michael S. Tsirkin wrote: On Sat, Jan 22, 2011 at 10:11:52AM +1100, Simon Horman wrote: On Fri, Jan 21, 2011 at 11:59:30AM +0200, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 05

Re: Flow Control and Port Mirroring Revisited

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 10:27:55AM -0800, Rick Jones wrote: Just to block netperf you can send it SIGSTOP :) Clever :) One could I suppose achieve the same result by making the remote receive socket buffer size smaller than the UDP message size and then not worry about having to learn

Re: Flow Control and Port Mirroring Revisited

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 11:01:45AM -0800, Rick Jones wrote: Michael S. Tsirkin wrote: On Mon, Jan 24, 2011 at 10:27:55AM -0800, Rick Jones wrote: Just to block netperf you can send it SIGSTOP :) Clever :) One could I suppose achieve the same result by making the remote receive socket

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 07:41:32AM -0700, Alex Williamson wrote: On Tue, 2011-01-25 at 08:36 +0100, Jan Kiszka wrote: On 2011-01-25 06:37, Alex Williamson wrote: On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how we might be able to allocate slots on demand.

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 12:20:03PM +0200, Avi Kivity wrote: On 01/24/2011 11:32 AM, Marcelo Tosatti wrote: On Fri, Jan 21, 2011 at 04:48:02PM -0700, Alex Williamson wrote: When doing device assignment, we use cpu_register_physical_memory() to directly map the qemu mmap of the device

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 04:53:44PM +0200, Avi Kivity wrote: For the other lookups, which we believe will succeed, we can assume the probablity of a match is related to the slot size, and sort the slots by page count. Unlikely to be true for assigned device BARs. -- MST -- To unsubscribe from

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 04:58:41PM +0200, Avi Kivity wrote: On 01/25/2011 04:55 PM, Michael S. Tsirkin wrote: We can't make it unbounded in the kernel, since a malicious user could start creating an infinite amount of memory slots, pinning unbounded kernel memory. How about keeping

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 07:33:40PM +0200, Avi Kivity wrote: On 01/25/2011 04:59 PM, Michael S. Tsirkin wrote: On Tue, Jan 25, 2011 at 04:53:44PM +0200, Avi Kivity wrote: For the other lookups, which we believe will succeed, we can assume the probablity of a match is related to the slot

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 07:34:18PM +0200, Avi Kivity wrote: On 01/25/2011 05:23 PM, Michael S. Tsirkin wrote: On Tue, Jan 25, 2011 at 04:58:41PM +0200, Avi Kivity wrote: On 01/25/2011 04:55 PM, Michael S. Tsirkin wrote: We can't make it unbounded in the kernel, since a malicious

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-26 Thread Michael S. Tsirkin
On Wed, Jan 26, 2011 at 11:17:11AM +0200, Avi Kivity wrote: On 01/25/2011 07:58 PM, Michael S. Tsirkin wrote: On Tue, Jan 25, 2011 at 07:33:40PM +0200, Avi Kivity wrote: On 01/25/2011 04:59 PM, Michael S. Tsirkin wrote: On Tue, Jan 25, 2011 at 04:53:44PM +0200, Avi Kivity wrote

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-26 Thread Michael S. Tsirkin
On Wed, Jan 26, 2011 at 11:23:21AM +0200, Avi Kivity wrote: On 01/26/2011 11:20 AM, Michael S. Tsirkin wrote: On Wed, Jan 26, 2011 at 11:17:11AM +0200, Avi Kivity wrote: On 01/25/2011 07:58 PM, Michael S. Tsirkin wrote: On Tue, Jan 25, 2011 at 07:33:40PM +0200, Avi Kivity wrote

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-26 Thread Michael S. Tsirkin
On Wed, Jan 26, 2011 at 11:54:21AM +0200, Avi Kivity wrote: On 01/26/2011 11:39 AM, Michael S. Tsirkin wrote: On Wed, Jan 26, 2011 at 11:23:21AM +0200, Avi Kivity wrote: On 01/26/2011 11:20 AM, Michael S. Tsirkin wrote: On Wed, Jan 26, 2011 at 11:17:11AM +0200, Avi Kivity wrote

Re: Network performance with small packets

2011-01-26 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 03:09:34PM -0600, Steve Dobbelstein wrote: I am working on a KVM network performance issue found in our lab running the DayTrader benchmark. The benchmark throughput takes a significant hit when running the application server in a KVM guest verses on bare metal. We

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 11:21:47AM +0200, Avi Kivity wrote: On 01/26/2011 02:08 PM, Michael S. Tsirkin wrote: I just mean that once you fault you map sptes and then you can use them without exits. mmio will cause exits each time. Right? The swapper scanning sptes, ksmd, khugepaged

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 11:26:19AM +0200, Michael S. Tsirkin wrote: On Thu, Jan 27, 2011 at 11:21:47AM +0200, Avi Kivity wrote: On 01/26/2011 02:08 PM, Michael S. Tsirkin wrote: I just mean that once you fault you map sptes and then you can use them without exits. mmio will cause

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 11:28:12AM +0200, Avi Kivity wrote: On 01/27/2011 11:26 AM, Michael S. Tsirkin wrote: Right. That's why I say that sorting by size might not be optimal. Maybe a cache ... Why would it not be optimal? If you have 16GB RAM in two slots and a few megabytes

Re: [PATCH] virtio_blk: allow re-reading config space at runtime

2011-01-27 Thread Michael S. Tsirkin
On Fri, Jan 14, 2011 at 05:01:37PM +0100, Christoph Hellwig wrote: Wire up the virtio_driver config_changed method to get notified about config changes raised by the host. For now we just re-read the device size to support online resizing of devices, but once we add more attributes that might

Re: Network performance with small packets

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 10:44:34AM -0800, Shirley Ma wrote: On Wed, 2011-01-26 at 17:17 +0200, Michael S. Tsirkin wrote: I am seeing a similar problem, and am trying to fix that. My current theory is that this is a variant of a receive livelock: if the application isn't fast enough

Re: Network performance with small packets

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 11:09:00AM -0800, Shirley Ma wrote: On Thu, 2011-01-27 at 21:00 +0200, Michael S. Tsirkin wrote: Interesting. In particular running vhost and the transmitting guest on the same host would have the effect of slowing down TX. Does it double the BW for you too

Re: Network performance with small packets

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 11:45:47AM -0800, Shirley Ma wrote: On Thu, 2011-01-27 at 21:31 +0200, Michael S. Tsirkin wrote: Well slowing down the guest does not sound hard - for example we can request guest notifications, or send extra interrupts :) A slightly more sophisticated thing to try

Re: Network performance with small packets

2011-01-28 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 01:30:38PM -0800, Shirley Ma wrote: On Thu, 2011-01-27 at 13:02 -0800, David Miller wrote: Interesting. Could this is be a variant of the now famuous bufferbloat then? Sigh, bufferbloat is the new global warming... :-/ Yep, some places become colder, some

[PATCHv2] vhost: force vhost off for non-MSI guests

2011-01-31 Thread Michael S. Tsirkin
, for now disable vhost-net in these configurations. Added a vhostforce flag to force vhost-net back on. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Untested, I'll send a pull request later after some testing assuming we've resolved the command line comments to everyone's satisfaction

Re: [PATCHv2] vhost: force vhost off for non-MSI guests

2011-01-31 Thread Michael S. Tsirkin
On Mon, Jan 31, 2011 at 02:47:34PM -0700, Alex Williamson wrote: On Mon, 2011-01-31 at 23:19 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization

Re: [PATCHv2] vhost: force vhost off for non-MSI guests

2011-01-31 Thread Michael S. Tsirkin
On Mon, Jan 31, 2011 at 03:07:49PM -0700, Alex Williamson wrote: On Tue, 2011-02-01 at 00:02 +0200, Michael S. Tsirkin wrote: On Mon, Jan 31, 2011 at 02:47:34PM -0700, Alex Williamson wrote: On Mon, 2011-01-31 at 23:19 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt

Re: Network performance with small packets

2011-01-31 Thread Michael S. Tsirkin
On Mon, Jan 31, 2011 at 06:24:34PM -0600, Steve Dobbelstein wrote: Michael S. Tsirkin m...@redhat.com wrote on 01/28/2011 06:16:16 AM: OK, so thinking about it more, maybe the issue is this: tx becomes full. We process one request and interrupt the guest, then it adds one request

Re: Network performance with small packets

2011-01-31 Thread Michael S. Tsirkin
On Mon, Jan 31, 2011 at 05:30:38PM -0800, Sridhar Samudrala wrote: On Mon, 2011-01-31 at 18:24 -0600, Steve Dobbelstein wrote: Michael S. Tsirkin m...@redhat.com wrote on 01/28/2011 06:16:16 AM: OK, so thinking about it more, maybe the issue is this: tx becomes full. We process one

[PULL] vhost-net: 2.6.38 - warning fix

2011-02-01 Thread Michael S. Tsirkin
(2011-01-31 20:56:54 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net Michael S. Tsirkin (1): vhost: rcu annotation fixup drivers/vhost/net.c |9 + drivers/vhost/vhost.h |6 +++--- 2 files changed, 8

[PATCHv2 dontapply] vhost-net tx tuning

2011-02-01 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin m...@redhat.com --- diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index aac05bc..6769cdc 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -32,6 +32,13 @@ * Using this limit prevents one virtqueue from starving others. */ #define VHOST_NET_WEIGHT

[PATCHv3 0.14] vhost: force vhost off for non-MSI guests

2011-02-01 Thread Michael S. Tsirkin
, for now disable vhost-net in these configurations. Added a vhostforce flag to force vhost-net back on. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- OK this is 0.14 material so quick review would be appreciated. This version's compiled only, I'll naturally test more before I queue

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 12:25:08PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 22:17 +0200, Michael S. Tsirkin wrote: On Tue, Feb 01, 2011 at 12:09:03PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 19:23 +0200, Michael S. Tsirkin wrote: On Thu, Jan 27, 2011 at 01:30:38PM -0800

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 01:09:45PM -0800, Shirley Ma wrote: On Mon, 2011-01-31 at 17:30 -0800, Sridhar Samudrala wrote: Yes. It definitely should be 'out'. 'in' should be 0 in the tx path. I tried a simpler version of this patch without any tunables by delaying the signaling until we

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 01:28:45PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:21 +0200, Michael S. Tsirkin wrote: Confused. We compare capacity to skb frags, no? That's sg I think ... Current guest kernel use indirect buffers, num_free returns how many available descriptors not skb

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 01:32:35PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:24 +0200, Michael S. Tsirkin wrote: My theory is that the issue is not signalling. Rather, our queue fills up, then host handles one packet and sends an interrupt, and we immediately wake the queue. So

Re: [PATCHv2 dontapply] vhost-net tx tuning

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 03:07:38PM -0800, Sridhar Samudrala wrote: On Tue, 2011-02-01 at 17:52 +0200, Michael S. Tsirkin wrote: OK, so thinking about it more, maybe the issue is this: tx becomes full. We process one request and interrupt the guest, then it adds one request and the queue

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 02:59:57PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:56 +0200, Michael S. Tsirkin wrote: There are flags for bytes, buffers and packets. Try playing with any one of them :) Just be sure to use v2. I would like to change it to half of the ring size

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 10:09:18AM +0530, Krishna Kumar2 wrote: Michael S. Tsirkin m...@redhat.com 02/02/2011 03:11 AM On Tue, Feb 01, 2011 at 01:28:45PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:21 +0200, Michael S. Tsirkin wrote: Confused. We compare capacity to skb frags

Re: Network performance with small packets

2011-02-01 Thread Michael S. Tsirkin
On Tue, Feb 01, 2011 at 10:19:09PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 22:05 -0800, Shirley Ma wrote: The way I am changing is only when netif queue has stopped, then we start to count num_free descriptors to send the signal to wake netif queue. I forgot to mention, the

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 07:39:45AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 12:48 +0200, Michael S. Tsirkin wrote: Yes, I think doing this in the host is much simpler, just send an interrupt after there's a decent amount of space in the queue. Having said that the simple

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 07:42:51AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 12:49 +0200, Michael S. Tsirkin wrote: On Tue, Feb 01, 2011 at 11:33:49PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:14 -0800, Shirley Ma wrote: w/i guest change, I played around the parameters

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 09:10:35AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 17:47 +0200, Michael S. Tsirkin wrote: On Wed, Feb 02, 2011 at 07:39:45AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 12:48 +0200, Michael S. Tsirkin wrote: Yes, I think doing this in the host is much

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 07:42:51AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 12:49 +0200, Michael S. Tsirkin wrote: On Tue, Feb 01, 2011 at 11:33:49PM -0800, Shirley Ma wrote: On Tue, 2011-02-01 at 23:14 -0800, Shirley Ma wrote: w/i guest change, I played around the parameters

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 10:11:51AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 19:32 +0200, Michael S. Tsirkin wrote: OK, but this should have no effect with a vhost patch which should ensure that we don't get an interrupt until the queue is at least half empty. Right? There should

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 03:09:34PM -0600, Steve Dobbelstein wrote: I am working on a KVM network performance issue found in our lab running the DayTrader benchmark. The benchmark throughput takes a significant hit when running the application server in a KVM guest verses on bare metal. We

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 11:29:35AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 20:27 +0200, Michael S. Tsirkin wrote: On Wed, Feb 02, 2011 at 10:11:51AM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 19:32 +0200, Michael S. Tsirkin wrote: OK, but this should have no effect

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 01:03:05PM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 22:17 +0200, Michael S. Tsirkin wrote: Well, this is also the only case where the queue is stopped, no? Yes. I got some debugging data, I saw that sometimes there were so many packets were waiting for free

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 01:41:33PM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 23:20 +0200, Michael S. Tsirkin wrote: On Wed, 2011-02-02 at 22:17 +0200, Michael S. Tsirkin wrote: Well, this is also the only case where the queue is stopped, no? Yes. I got some debugging data, I saw

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 09:05:56PM -0800, Shirley Ma wrote: On Wed, 2011-02-02 at 23:20 +0200, Michael S. Tsirkin wrote: I think I need to define the test matrix to collect data for TX xmit from guest to host here for different tests. Data to be collected

Re: Network performance with small packets

2011-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2011 at 10:09:14PM -0800, Shirley Ma wrote: On Thu, 2011-02-03 at 07:59 +0200, Michael S. Tsirkin wrote: Let's look at the sequence here: guest start_xmit() xmit_skb() if ring is full, enable_cb() guest skb_xmit_done

Re: Network performance with small packets

2011-02-03 Thread Michael S. Tsirkin
On Thu, Feb 03, 2011 at 07:58:00AM -0800, Shirley Ma wrote: On Thu, 2011-02-03 at 08:13 +0200, Michael S. Tsirkin wrote: Initial TCP_STREAM performance results I got for guest to local host 4.2Gb/s for 1K message size, (vs. 2.5Gb/s) 6.2Gb/s for 2K message size, and (vs. 3.8Gb/s

Re: [PATCH 03/13] AMD IOMMU emulation

2011-02-06 Thread Michael S. Tsirkin
On Fri, Feb 04, 2011 at 01:32:57AM +0200, Eduard - Gabriel Munteanu wrote: This introduces emulation for the AMD IOMMU, described in AMD I/O Virtualization Technology (IOMMU) Specification. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |2 +-

Re: [PATCH 01/13] Generic DMA memory access interface

2011-02-06 Thread Michael S. Tsirkin
On Fri, Feb 04, 2011 at 01:32:55AM +0200, Eduard - Gabriel Munteanu wrote: This introduces replacements for memory access functions like cpu_physical_memory_read(). The new interface can handle address translation and access checking through an IOMMU. Signed-off-by: Eduard - Gabriel Munteanu

Re: [PATCH 04/13] ide: use the DMA memory access interface for PCI IDE controllers

2011-02-06 Thread Michael S. Tsirkin
On Fri, Feb 04, 2011 at 01:32:58AM +0200, Eduard - Gabriel Munteanu wrote: Emulated PCI IDE controllers now use the memory access interface. This also allows an emulated IOMMU to translate and check accesses. Map invalidation results in cancelling DMA transfers. Since the guest OS can't

Re: [PATCH 01/13] Generic DMA memory access interface

2011-02-06 Thread Michael S. Tsirkin
On Fri, Feb 04, 2011 at 01:32:55AM +0200, Eduard - Gabriel Munteanu wrote: This introduces replacements for memory access functions like cpu_physical_memory_read(). The new interface can handle address translation and access checking through an IOMMU. Signed-off-by: Eduard - Gabriel Munteanu

Re: [PATCH 2/3] AMD IOMMU support

2011-02-06 Thread Michael S. Tsirkin
On Fri, Feb 04, 2011 at 01:24:14AM +0200, Eduard - Gabriel Munteanu wrote: This initializes the AMD IOMMU and creates ACPI tables for it. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- src/acpi.c | 84

Re: [PATCH 2/3] AMD IOMMU support

2011-02-06 Thread Michael S. Tsirkin
On Sun, Feb 06, 2011 at 03:41:45PM +0200, Eduard - Gabriel Munteanu wrote: On Sun, Feb 06, 2011 at 01:47:57PM +0200, Michael S. Tsirkin wrote: On Fri, Feb 04, 2011 at 01:24:14AM +0200, Eduard - Gabriel Munteanu wrote: Hi, [snip] +/* + * IVRS (I/O Virtualization Reporting Structure

Re: Network performance with small packets

2011-02-08 Thread Michael S. Tsirkin
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 03:11 AM On Tue, Feb 01, 2011 at 01:28:45PM -0800

Re: Network performance with small packets

2011-02-08 Thread Michael S. Tsirkin
On Wed, Feb 09, 2011 at 12:09:35PM +1030, Rusty Russell wrote: 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

Re: [RFC PATCH V2 0/5] macvtap TX zero copy between guest and host kernel

2011-02-14 Thread Michael S. Tsirkin
On Fri, Dec 10, 2010 at 01:51:31AM -0800, Shirley Ma wrote: This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced 30-50% CPU usage for vhost thread for single

Re: virtio_net sometimes didn't work

2011-02-15 Thread Michael S. Tsirkin
got swapped between the devices. Try lspci -vv in guest and info pci in qemu and compare the io address values. 2010/12/9 Michael S. Tsirkin m...@redhat.com: On Fri, Nov 26, 2010 at 10:38:33AM +0800, lidong chen wrote: Does this message appear on boot, or after some stress? on boot

Re: virtio_net sometimes didn't work

2011-02-16 Thread Michael S. Tsirkin
here This implies that io addr values got swapped between the devices. Try lspci -vv in guest and info pci in qemu and compare the io address values. 2010/12/9 Michael S. Tsirkin m...@redhat.com: On Fri, Nov 26, 2010 at 10:38:33AM +0800, lidong chen wrote: Does this message

KVM call minutes for Feb 22

2011-02-22 Thread Michael S. Tsirkin
Looks like Chris will send minutes too, so I didn't do much to polish this, I didn't realise he's doing it until I had this, so here's the braindump: hope it helps. 1. 0.14 postmortem - what went well wiki for planning testing - what can be improved rc - cycle could be

Re: [v3 RFC PATCH 0/4] Implement multiqueue virtio-net

2011-02-22 Thread Michael S. Tsirkin
On Wed, Feb 23, 2011 at 10:52:09AM +0530, Krishna Kumar2 wrote: Simon Horman ho...@verge.net.au wrote on 02/22/2011 01:17:09 PM: Hi Simon, I have a few questions about the results below: 1. Are the (%) comparisons between non-mq and mq virtio? Yes - mainline kernel with

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-23 Thread Michael S. Tsirkin
On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Looks pretty good overall. A few comments

Re: [v3 RFC PATCH 0/4] Implement multiqueue virtio-net

2011-02-23 Thread Michael S. Tsirkin
On Wed, Feb 23, 2011 at 12:18:36PM +0530, Krishna Kumar2 wrote: Michael S. Tsirkin m...@redhat.com wrote on 02/23/2011 12:09:15 PM: Hi Michael, Yes. Michael Tsirkin had wanted to see how the MQ RX patch would look like, so I was in the process of getting the two working together

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-23 Thread Michael S. Tsirkin
On Wed, Feb 23, 2011 at 09:34:19AM -0700, Alex Williamson wrote: On Wed, 2011-02-23 at 14:59 +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: +static int msix_table_mmio_read(struct kvm_io_device

Re: [ISC-Bugs #22806] [PATCH] lfp: fix AF_INET checksum with csum offloading

2011-02-23 Thread Michael S. Tsirkin
No answer from isc so far. I think it's a problem that the popular dhclient has had this bug for so long. Anyone knows what else can be done? On Mon, Dec 27, 2010 at 07:16:32PM +0200, Michael S. Tsirkin wrote: When an AF_INET socket is used, linux would sometimes return a packet without

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Michael S. Tsirkin
On Thu, Feb 24, 2011 at 04:08:22PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Michael S. Tsirkin
On Thu, Feb 24, 2011 at 05:44:20PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng

Re: [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-24 Thread Michael S. Tsirkin
On Thu, Feb 24, 2011 at 05:51:03PM +0800, Sheng Yang wrote: Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Michael S. Tsirkin
On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh...@linux.intel.com Doesn't look like all comments got addressed. E.g. gpa_t entry_base is still there and in reality you said it's a host

Re: [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2011 at 11:23:30AM +0800, Sheng Yang wrote: On Thursday 24 February 2011 18:22:19 Michael S. Tsirkin wrote: On Thu, Feb 24, 2011 at 05:51:03PM +0800, Sheng Yang wrote: Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2011 at 02:28:02PM +0800, Sheng Yang wrote: On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2011 at 02:12:42PM +0800, Sheng Yang wrote: On Thursday 24 February 2011 18:17:34 Michael S. Tsirkin wrote: On Thu, Feb 24, 2011 at 05:44:20PM +0800, Sheng Yang wrote: On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: On Wed, Feb 23, 2011 at 02:59:04PM

Re: Bug inkvm_set_irq

2011-02-27 Thread Michael S. Tsirkin
On Fri, Feb 25, 2011 at 10:07:22AM +0100, Jean-Philippe Menil wrote: Hi, Each time i try tou use vhost_net, i'm facing a kernel bug. I do a modprobe vhost_net, and start guest whith vhost=on. Following is a trace with a kernel 2.6.37, but i had the same problem with 2.6.36 (cf

Re: [PATCH 0/3] [RFC] Implement multiqueue (RX TX) virtio-net

2011-02-27 Thread Michael S. Tsirkin
On Mon, Feb 28, 2011 at 12:04:27PM +0530, Krishna Kumar wrote: This patch series is a continuation of an earlier one that implemented guest MQ TX functionality. This new patchset implements both RX and TX MQ. Qemu changes are not being included at this time solely to aid in easier review.

Re: [PATCH 2/3] [RFC] Changes for MQ virtio-net

2011-02-28 Thread Michael S. Tsirkin
On Mon, Feb 28, 2011 at 12:04:37PM +0530, Krishna Kumar 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_NUMTXQS. Patch also adds a macro for the maximum number

Re: Bug inkvm_set_irq

2011-02-28 Thread Michael S. Tsirkin
On Mon, Feb 28, 2011 at 09:56:46AM +0100, Jean-Philippe Menil wrote: Le 27/02/2011 18:00, Michael S. Tsirkin a écrit : On Fri, Feb 25, 2011 at 10:07:22AM +0100, Jean-Philippe Menil wrote: Hi, Each time i try tou use vhost_net, i'm facing a kernel bug. I do a modprobe vhost_net, and start

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-28 Thread Michael S. Tsirkin
On Mon, Feb 28, 2011 at 03:20:04PM +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh...@linux.intel.com A general question: we implement mmio read and write operation here, but seem to do nothing about ordering. In

<    1   2   3   4   5   6   7   8   9   10   >