Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-25 Thread Jason Wang
On 2017年04月25日 00:40, Michael S. Tsirkin wrote: On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: Maybe I was wrong, but according to Michael's comment it looks like he want check affinity_hint_set just for speculative tx polling on rx napi instead of disabling it at all. And

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Mon, Apr 24, 2017 at 1:14 PM, Michael S. Tsirkin wrote: > On Mon, Apr 24, 2017 at 01:05:45PM -0400, Willem de Bruijn wrote: >> On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: >> > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: >> >> >>> Maybe I was wrong, but acc

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: >> >>> Maybe I was wrong, but according to Michael's comment it looks like he >> >>> want >> >>> check affinity_hint_set just for speculative tx polling on rx napi >> >>>

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Thu, Apr 20, 2017 at 12:02 PM, Willem de Bruijn wrote: >>> static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) >>> { >>> struct virtio_net_hdr_mrg_rxbuf *hdr; >>> @@ -1130,9 +1172,11 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, >>> struct net_device *dev) >>>

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
>>> Maybe I was wrong, but according to Michael's comment it looks like he >>> want >>> check affinity_hint_set just for speculative tx polling on rx napi >>> instead >>> of disabling it at all. >>> >>> And I'm not convinced this is really needed, driver only provide affinity >>> hint instead of af

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
>> static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) >> { >> struct virtio_net_hdr_mrg_rxbuf *hdr; >> @@ -1130,9 +1172,11 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, >> struct net_device *dev) >> int err; >> struct netdev_queue *txq = netdev_get_t

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Thu, Apr 20, 2017 at 2:27 AM, Jason Wang wrote: > > > On 2017年04月19日 04:21, Willem de Bruijn wrote: >> >> +static void virtnet_napi_tx_enable(struct virtnet_info *vi, >> + struct virtqueue *vq, >> + struct napi_struct *napi) >> +

[PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in ndo_start_xmit. Latency depends o

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Michael S. Tsirkin
On Mon, Apr 24, 2017 at 01:05:45PM -0400, Willem de Bruijn wrote: > On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: > > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: > >> >>> Maybe I was wrong, but according to Michael's comment it looks like he > >> >>> want > >> >

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Michael S. Tsirkin
On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: > >>> Maybe I was wrong, but according to Michael's comment it looks like he > >>> want > >>> check affinity_hint_set just for speculative tx polling on rx napi > >>> instead > >>> of disabling it at all. > >>> > >>> And I'm not conv

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-20 Thread Jason Wang
On 2017年04月20日 21:58, Willem de Bruijn wrote: On Thu, Apr 20, 2017 at 2:27 AM, Jason Wang wrote: On 2017年04月19日 04:21, Willem de Bruijn wrote: +static void virtnet_napi_tx_enable(struct virtnet_info *vi, + struct virtqueue *vq, +

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-19 Thread Jason Wang
On 2017年04月19日 04:21, Willem de Bruijn wrote: +static void virtnet_napi_tx_enable(struct virtnet_info *vi, + struct virtqueue *vq, + struct napi_struct *napi) +{ + if (!napi->weight) + return; + + if (!v

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-19 Thread Jason Wang
On 2017年04月19日 04:21, Willem de Bruijn wrote: From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission o