Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-09-09 Thread Jason Wang
On 2018年09月10日 07:07, Willem de Bruijn wrote: On Wed, Aug 29, 2018 at 9:01 AM Willem de Bruijn wrote: On Wed, Aug 29, 2018 at 3:56 AM Jason Wang wrote: On 2018年08月29日 03:57, Willem de Bruijn wrote: On Mon, Jul 30, 2018 at 2:06 AM Jason Wang wrote: On 2018年07月25日 08:17, Jon Olson wrot

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-09-09 Thread Willem de Bruijn
On Wed, Aug 29, 2018 at 9:01 AM Willem de Bruijn wrote: > > On Wed, Aug 29, 2018 at 3:56 AM Jason Wang wrote: > > > > > > > > On 2018年08月29日 03:57, Willem de Bruijn wrote: > > > On Mon, Jul 30, 2018 at 2:06 AM Jason Wang wrote: > > >> > > >> > > >> On 2018年07月25日 08:17, Jon Olson wrote: > > >>>

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-29 Thread Willem de Bruijn
On Wed, Aug 29, 2018 at 3:56 AM Jason Wang wrote: > > > > On 2018年08月29日 03:57, Willem de Bruijn wrote: > > On Mon, Jul 30, 2018 at 2:06 AM Jason Wang wrote: > >> > >> > >> On 2018年07月25日 08:17, Jon Olson wrote: > >>> On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin > >>> wrote: > On Tue

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-29 Thread Jason Wang
On 2018年08月29日 03:57, Willem de Bruijn wrote: On Mon, Jul 30, 2018 at 2:06 AM Jason Wang wrote: On 2018年07月25日 08:17, Jon Olson wrote: On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: On Tue, Jul 24, 2018 at 6:2

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-28 Thread Willem de Bruijn
On Mon, Jul 30, 2018 at 2:06 AM Jason Wang wrote: > > > > On 2018年07月25日 08:17, Jon Olson wrote: > > On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: > >> On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > >>> On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin > >>> wr

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Willem de Bruijn
On Wed, Aug 1, 2018 at 6:48 PM Michael S. Tsirkin wrote: > > On Wed, Aug 01, 2018 at 06:43:53PM -0400, Willem de Bruijn wrote: > > > > So e.g. we could set an affinity hint to a group of CPUs that > > > > > might transmit to this queue. > > > > > > > > We also want to set the xps mask for all cpu

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 06:43:53PM -0400, Willem de Bruijn wrote: > > > So e.g. we could set an affinity hint to a group of CPUs that > > > > might transmit to this queue. > > > > > > We also want to set the xps mask for all cpus in the group to this queue. > > > > > > Is there a benefit over expl

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Willem de Bruijn
> > So e.g. we could set an affinity hint to a group of CPUs that > > > might transmit to this queue. > > > > We also want to set the xps mask for all cpus in the group to this queue. > > > > Is there a benefit over explicitly choosing one cpu from the set, btw? > > If only one CPU actually transm

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 02:06:50PM +0800, Jason Wang wrote: > > > On 2018年07月25日 08:17, Jon Olson wrote: > > On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: > > > On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > > > > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirki

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 11:46:14AM -0400, Willem de Bruijn wrote: > On Tue, Jul 31, 2018 at 8:34 AM Michael S. Tsirkin wrote: > > > > On Sun, Jul 29, 2018 at 05:32:56PM -0400, Willem de Bruijn wrote: > > > On Sun, Jul 29, 2018 at 12:01 PM David Miller wrote: > > > > > > > > From: Caleb Raitto >

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Willem de Bruijn
> > > > Just distribute across the available cpus evenly, and be done with it. > > > > > > Sounds good to me. > > > > So e.g. we could set an affinity hint to a group of CPUs that > > might transmit to this queue. > > We also want to set the xps mask for all cpus in the group to this queue. > > Is

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-08-01 Thread Willem de Bruijn
On Tue, Jul 31, 2018 at 8:34 AM Michael S. Tsirkin wrote: > > On Sun, Jul 29, 2018 at 05:32:56PM -0400, Willem de Bruijn wrote: > > On Sun, Jul 29, 2018 at 12:01 PM David Miller wrote: > > > > > > From: Caleb Raitto > > > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > > > > > From: Caleb Raitto >

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-31 Thread Michael S. Tsirkin
On Sun, Jul 29, 2018 at 05:32:56PM -0400, Willem de Bruijn wrote: > On Sun, Jul 29, 2018 at 12:01 PM David Miller wrote: > > > > From: Caleb Raitto > > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > > > From: Caleb Raitto > > > > > > The driver disables tx napi if it's not certain that completions

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-30 Thread Jason Wang
On 2018年07月31日 03:51, Stephen Hemminger wrote: On Sun, 29 Jul 2018 09:00:27 -0700 (PDT) David Miller wrote: From: Caleb Raitto Date: Mon, 23 Jul 2018 16:11:19 -0700 From: Caleb Raitto The driver disables tx napi if it's not certain that completions will be processed affine with tx serv

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-30 Thread Stephen Hemminger
On Sun, 29 Jul 2018 09:00:27 -0700 (PDT) David Miller wrote: > From: Caleb Raitto > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic does

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread Jason Wang
On 2018年07月25日 08:17, Jon Olson wrote: On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: >

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread Willem de Bruijn
On Sun, Jul 29, 2018 at 12:01 PM David Miller wrote: > > From: Caleb Raitto > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic doesn't accoun

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread Willem de Bruijn
On Sun, Jul 29, 2018 at 4:48 PM Michael S. Tsirkin wrote: > > On Sun, Jul 29, 2018 at 09:00:27AM -0700, David Miller wrote: > > From: Caleb Raitto > > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > > > From: Caleb Raitto > > > > > > The driver disables tx napi if it's not certain that completions w

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread David Miller
From: "Michael S. Tsirkin" Date: Sun, 29 Jul 2018 23:33:20 +0300 > The point really is that tx irq handler needs a lock on the tx queue to > free up skbs, so processing it on another CPU while tx is active causes > cache line bounces. So we want affinity to CPUs that submit to this > queue on the

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread Michael S. Tsirkin
On Sun, Jul 29, 2018 at 09:00:27AM -0700, David Miller wrote: > From: Caleb Raitto > Date: Mon, 23 Jul 2018 16:11:19 -0700 > > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic doesn

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-29 Thread David Miller
From: Caleb Raitto Date: Mon, 23 Jul 2018 16:11:19 -0700 > From: Caleb Raitto > > The driver disables tx napi if it's not certain that completions will > be processed affine with tx service. > > Its heuristic doesn't account for some scenarios where it is, such as > when the queue pair count m

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Jon Olson
On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > > >From the above linke

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 6:46 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > > >From the above linke

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > >From the above linked patch, I understand that there are yet > > > other special cases in p

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > >From the above linked patch, I understand that there are yet > > other special cases in production, such as a hard cap on #tx queues to > > 32 regardless of number o

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > >From the above linked patch, I understand that there are yet > other special cases in production, such as a hard cap on #tx queues to > 32 regardless of number of vcpus. I don't think upstream kernels have this limit - we can now

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 2:39 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 10:01:39AM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:44 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > > > > From: Caleb Raitto > > >

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 10:01:39AM -0400, Willem de Bruijn wrote: > On Tue, Jul 24, 2018 at 6:44 AM Michael S. Tsirkin wrote: > > > > On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > > > From: Caleb Raitto > > > > > > The driver disables tx napi if it's not certain that completions

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 6:44 AM Michael S. Tsirkin wrote: > > On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic doesn't a

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > From: Caleb Raitto > > The driver disables tx napi if it's not certain that completions will > be processed affine with tx service. > > Its heuristic doesn't account for some scenarios where it is, such as > when the queue pair coun

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Willem de Bruijn
On Mon, Jul 23, 2018 at 8:55 PM Stephen Hemminger wrote: > > On Mon, 23 Jul 2018 16:11:19 -0700 > Caleb Raitto wrote: > > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic doesn't acco

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Stephen Hemminger
On Mon, 23 Jul 2018 16:11:19 -0700 Caleb Raitto wrote: > From: Caleb Raitto > > The driver disables tx napi if it's not certain that completions will > be processed affine with tx service. > > Its heuristic doesn't account for some scenarios where it is, such as > when the queue pair count mat

[PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Caleb Raitto
From: Caleb Raitto The driver disables tx napi if it's not certain that completions will be processed affine with tx service. Its heuristic doesn't account for some scenarios where it is, such as when the queue pair count matches the core but not hyperthread count. Allow userspace to override t