Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-06 Thread Christian Borntraeger
On 02/03/2017 07:19 AM, Ben Serebrin wrote: [...] > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1502,20 +1502,44 @@ static void virtnet_set_affinity(struct virtnet_info > *vi) >* queue pairs, we let the queue pairs to be private to one cpu by >* setting

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-05 Thread Jason Wang
On 2017年02月06日 15:28, Benjamin Serebrin wrote: On Sun, Feb 5, 2017 at 11:24 PM, Jason Wang wrote: On 2017年02月03日 14:19, Ben Serebrin wrote: From: Benjamin Serebrin If the number of virtio queue pairs is not equal to the number of VCPUs, the virtio

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-05 Thread Benjamin Serebrin
On Sun, Feb 5, 2017 at 11:24 PM, Jason Wang wrote: > > > On 2017年02月03日 14:19, Ben Serebrin wrote: >> >> From: Benjamin Serebrin >> >> If the number of virtio queue pairs is not equal to the >> number of VCPUs, the virtio guest driver doesn't assign >>

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-05 Thread Jason Wang
On 2017年02月03日 14:19, Ben Serebrin wrote: From: Benjamin Serebrin If the number of virtio queue pairs is not equal to the number of VCPUs, the virtio guest driver doesn't assign any CPU affinity for the queue interrupts or the xps aggregation interrupt. So this in fact

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Willem de Bruijn
On Fri, Feb 3, 2017 at 1:34 PM, Rick Jones wrote: > On 02/03/2017 10:31 AM, Willem de Bruijn wrote: >> >> Configuring interrupts and xps from userspace at boot is more robust, >> as device driver defaults can change. But especially for customers who >> are unaware of these

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Rick Jones
On 02/03/2017 10:31 AM, Willem de Bruijn wrote: Configuring interrupts and xps from userspace at boot is more robust, as device driver defaults can change. But especially for customers who are unaware of these settings, choosing sane defaults won't hurt. The devil is in finding the sane

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Rick Jones
On 02/03/2017 10:22 AM, Benjamin Serebrin wrote: Thanks, Michael, I'll put this text in the commit log: XPS settings aren't write-able from userspace, so the only way I know to fix XPS is in the driver. ?? root@np-cp1-c0-m1-mgmt:/home/stack# cat

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Willem de Bruijn
> XPS settings aren't write-able from userspace, so the only way I know > to fix XPS is in the driver. It is writable by privileged users. >> I wonder why not just do it in userspace though. Configuring interrupts and xps from userspace at boot is more robust, as device driver defaults can

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Benjamin Serebrin
Thanks, Michael, I'll put this text in the commit log: XPS settings aren't write-able from userspace, so the only way I know to fix XPS is in the driver. The interrupt affinity settings could be set by irqbalancer, yes, but it's not always enabled (by intention) in all guests. I just confirmed

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-03 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 10:19:05PM -0800, Ben Serebrin wrote: > From: Benjamin Serebrin > > If the number of virtio queue pairs is not equal to the > number of VCPUs, the virtio guest driver doesn't assign > any CPU affinity for the queue interrupts or the xps > aggregation

[PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-02 Thread Ben Serebrin
From: Benjamin Serebrin If the number of virtio queue pairs is not equal to the number of VCPUs, the virtio guest driver doesn't assign any CPU affinity for the queue interrupts or the xps aggregation interrupt. Google Compute Engine currently provides 1 queue pair for