Re: [PATCH 2/5] virtio: introduce an API to set affinity for a virtqueue

2012-09-05 Thread Rusty Russell
Paolo Bonzini  writes:

> From: Jason Wang 
>
> Sometimes, virtio device need to configure irq affinity hint to maximize the
> performance. Instead of just exposing the irq of a virtqueue, this patch
> introduce an API to set the affinity for a virtqueue.
>
> The api is best-effort, the affinity hint may not be set as expected due to
> platform support, irq sharing or irq type. Currently, only pci method were
> implemented and we set the affinity according to:
>
> - if device uses INTX, we just ignore the request
> - if device has per vq vector, we force the affinity hint
> - if the virtqueues share MSI, make the affinity OR over all affinities
>   requested
>
> Signed-off-by: Jason Wang 
> Signed-off-by: Paolo Bonzini 

Applied, thanks.

Acked-by: Rusty Russell 

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/5] virtio: introduce an API to set affinity for a virtqueue

2012-09-05 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes:

 From: Jason Wang jasow...@redhat.com

 Sometimes, virtio device need to configure irq affinity hint to maximize the
 performance. Instead of just exposing the irq of a virtqueue, this patch
 introduce an API to set the affinity for a virtqueue.

 The api is best-effort, the affinity hint may not be set as expected due to
 platform support, irq sharing or irq type. Currently, only pci method were
 implemented and we set the affinity according to:

 - if device uses INTX, we just ignore the request
 - if device has per vq vector, we force the affinity hint
 - if the virtqueues share MSI, make the affinity OR over all affinities
   requested

 Signed-off-by: Jason Wang jasow...@redhat.com
 Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Applied, thanks.

Acked-by: Rusty Russell ru...@rustcorp.com.au

Cheers,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/