qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi
@ 2012-12-12 10:48 Michael S. Tsirkin
  2012-12-12 11:39 ` Jan Kiszka
  2012-12-13  4:55 ` Asias He
  0 siblings, 2 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2012-12-12 10:48 UTC (permalink / raw)
  To: qemu-devel, asias
  Cc: Peter Maydell, kvm, Michael S. Tsirkin, Jan Kiszka,
	Marcelo Tosatti, Avi Kivity

Deleting a GSI isn't necessary: it is enough
to stop using it. Delay flush until an entry is used.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 kvm-all.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 3bc3347..fb3180d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq)
         }
     }
     clear_gsi(s, virq);
-
-    kvm_irqchip_commit_routes(s);
 }
 
 static unsigned int kvm_hash_msi(uint32_t data)
-- 
MST

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi
  2012-12-12 10:48 [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi Michael S. Tsirkin
@ 2012-12-12 11:39 ` Jan Kiszka
  2012-12-13  4:55 ` Asias He
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2012-12-12 11:39 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Peter Maydell, kvm@vger.kernel.org, Marcelo Tosatti,
	qemu-devel@nongnu.org, Avi Kivity, asias@redhat.com

On 2012-12-12 11:48, Michael S. Tsirkin wrote:
> Deleting a GSI isn't necessary: it is enough
> to stop using it. Delay flush until an entry is used.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  kvm-all.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 3bc3347..fb3180d 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq)
>          }
>      }
>      clear_gsi(s, virq);
> -
> -    kvm_irqchip_commit_routes(s);
>  }
>  
>  static unsigned int kvm_hash_msi(uint32_t data)
> 

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi
  2012-12-12 10:48 [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi Michael S. Tsirkin
  2012-12-12 11:39 ` Jan Kiszka
@ 2012-12-13  4:55 ` Asias He
  2012-12-13 15:34   ` Jan Kiszka
  1 sibling, 1 reply; 5+ messages in thread
From: Asias He @ 2012-12-13  4:55 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Jan Kiszka, Marcelo Tosatti, qemu-devel, kvm, Peter Maydell

Hello Michael,

On 12/12/2012 06:48 PM, Michael S. Tsirkin wrote:
> Deleting a GSI isn't necessary: it is enough
> to stop using it. Delay flush until an entry is used.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  kvm-all.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 3bc3347..fb3180d 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq)
>          }
>      }
>      clear_gsi(s, virq);
> -
> -    kvm_irqchip_commit_routes(s);
>  }
>  
>  static unsigned int kvm_hash_msi(uint32_t data)
> 

I tried this patch with vhost-blk with qemu-1.3.0
6d6c9f59ca1b1a76ade7ad868bef191818f58819.

Without the drop of msix_fire_vector_notifier in msix_handle_mask_update
hack
Before: ~20K IOPS
After:  ~35K IOPS

With the drop of msix_fire_vector_notifier in
msix_handle_mask_update hack
Before:  ~197K IOPS
After:   ~197K IOPS

-- 
Asias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi
  2012-12-13  4:55 ` Asias He
@ 2012-12-13 15:34   ` Jan Kiszka
  2012-12-14  1:00     ` Asias He
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2012-12-13 15:34 UTC (permalink / raw)
  To: Asias He
  Cc: Peter Maydell, Marcelo Tosatti, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, Michael S. Tsirkin

On 2012-12-13 05:55, Asias He wrote:
> Hello Michael,
> 
> On 12/12/2012 06:48 PM, Michael S. Tsirkin wrote:
>> Deleting a GSI isn't necessary: it is enough
>> to stop using it. Delay flush until an entry is used.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>  kvm-all.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index 3bc3347..fb3180d 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq)
>>          }
>>      }
>>      clear_gsi(s, virq);
>> -
>> -    kvm_irqchip_commit_routes(s);
>>  }
>>  
>>  static unsigned int kvm_hash_msi(uint32_t data)
>>
> 
> I tried this patch with vhost-blk with qemu-1.3.0
> 6d6c9f59ca1b1a76ade7ad868bef191818f58819.
> 
> Without the drop of msix_fire_vector_notifier in msix_handle_mask_update
> hack
> Before: ~20K IOPS
> After:  ~35K IOPS
> 
> With the drop of msix_fire_vector_notifier in
> msix_handle_mask_update hack
> Before:  ~197K IOPS
> After:   ~197K IOPS
> 

Is the guest balancing the IRQ(s) between its vCPUs all the time?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi
  2012-12-13 15:34   ` Jan Kiszka
@ 2012-12-14  1:00     ` Asias He
  0 siblings, 0 replies; 5+ messages in thread
From: Asias He @ 2012-12-14  1:00 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Peter Maydell, Marcelo Tosatti, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, Michael S. Tsirkin

Hello Jan,

On 12/13/2012 11:34 PM, Jan Kiszka wrote:
> On 2012-12-13 05:55, Asias He wrote:
>> Hello Michael,
>>
>> On 12/12/2012 06:48 PM, Michael S. Tsirkin wrote:
>>> Deleting a GSI isn't necessary: it is enough
>>> to stop using it. Delay flush until an entry is used.
>>>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>  kvm-all.c | 2 --
>>>  1 file changed, 2 deletions(-)
>>>
>>> diff --git a/kvm-all.c b/kvm-all.c
>>> index 3bc3347..fb3180d 100644
>>> --- a/kvm-all.c
>>> +++ b/kvm-all.c
>>> @@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq)
>>>          }
>>>      }
>>>      clear_gsi(s, virq);
>>> -
>>> -    kvm_irqchip_commit_routes(s);
>>>  }
>>>  
>>>  static unsigned int kvm_hash_msi(uint32_t data)
>>>
>>
>> I tried this patch with vhost-blk with qemu-1.3.0
>> 6d6c9f59ca1b1a76ade7ad868bef191818f58819.
>>
>> Without the drop of msix_fire_vector_notifier in msix_handle_mask_update
>> hack
>> Before: ~20K IOPS
>> After:  ~35K IOPS
>>
>> With the drop of msix_fire_vector_notifier in
>> msix_handle_mask_update hack
>> Before:  ~197K IOPS
>> After:   ~197K IOPS
>>
> 
> Is the guest balancing the IRQ(s) between its vCPUs all the time?

Yes. In all of the four the cases (w/o gsi patch, w/o drop of
msix_fire_vector_notifier hack), IRQs balanced evenly in all vCPUs.


-- 
Asias

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-14  0:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 10:48 [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi Michael S. Tsirkin
2012-12-12 11:39 ` Jan Kiszka
2012-12-13  4:55 ` Asias He
2012-12-13 15:34   ` Jan Kiszka
2012-12-14  1:00     ` Asias He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).