Displaying 20 results from an estimated 29 matches for "__netif_tx_trylock".
2017 Apr 24
2
[PATCH net-next v2 2/5] virtio-net: transmit napi
...ive. But I'd prefer a comment
> near it explaining why it's there.
I don't feel strongly. Was minutes away from sending a v3 with this
code reverted, but I'll reinstate it and add a comment. Other planned
changes based on Jason's feedback to v2:
v2 -> v3:
- convert __netif_tx_trylock to __netif_tx_lock on tx napi poll
ensure that the handler always cleans, to avoid deadlock
- unconditionally clean in start_xmit
avoid adding an unnecessary "if (use_napi)" branch
- remove virtqueue_disable_cb in patch 5/5
a noop in the common event_...
2017 Apr 24
2
[PATCH net-next v2 2/5] virtio-net: transmit napi
...ive. But I'd prefer a comment
> near it explaining why it's there.
I don't feel strongly. Was minutes away from sending a v3 with this
code reverted, but I'll reinstate it and add a comment. Other planned
changes based on Jason's feedback to v2:
v2 -> v3:
- convert __netif_tx_trylock to __netif_tx_lock on tx napi poll
ensure that the handler always cleans, to avoid deadlock
- unconditionally clean in start_xmit
avoid adding an unnecessary "if (use_napi)" branch
- remove virtqueue_disable_cb in patch 5/5
a noop in the common event_...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...pleted_queue(txq, packets, bytes);
> +
> u64_stats_update_begin(&sq->stats.syncp);
> sq->stats.bytes += bytes;
> sq->stats.packets += packets;
> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> return;
>
> if (__netif_tx_trylock(txq)) {
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, true);
> __netif_tx_unlock(txq);
> }
>
> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, vq2txq...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...pleted_queue(txq, packets, bytes);
> +
> u64_stats_update_begin(&sq->stats.syncp);
> sq->stats.bytes += bytes;
> sq->stats.packets += packets;
> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> return;
>
> if (__netif_tx_trylock(txq)) {
> - free_old_xmit_skbs(sq);
> + free_old_xmit_skbs(sq, txq, true);
> __netif_tx_unlock(txq);
> }
>
> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, vq2txq...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...;>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
>>> struct netdev_queue *t...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...;>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
>>> struct netdev_queue *t...
2018 Dec 05
3
[PATCH RFC 0/2] virtio-net: interrupt related improvements
Now that we have brought the virtio overhead way down with a fast packed
ring implementation, we seem to be actually observing TCP drops
indicative of bufferbloat. So let's try to enable TSQ. Note: it isn't
clear that the default pacing is great for the virt usecase. It's worth
trying to play with sk_pacing_shift_update to see what happens.
For this reason, and for a more important
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...;>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
>>> struct netdev_queue *t...
2018 Dec 27
2
[PATCH RFC 1/2] virtio-net: bql support
...;>> u64_stats_update_begin(&sq->stats.syncp);
>>> sq->stats.bytes += bytes;
>>> sq->stats.packets += packets;
>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> return;
>>> if (__netif_tx_trylock(txq)) {
>>> - free_old_xmit_skbs(sq);
>>> + free_old_xmit_skbs(sq, txq, true);
>>> __netif_tx_unlock(txq);
>>> }
>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
>>> struct netdev_queue *t...
2018 Dec 05
0
[PATCH RFC 1/2] virtio-net: bql support
...return;
+ if (use_napi)
+ netdev_tx_completed_queue(txq, packets, bytes);
+
u64_stats_update_begin(&sq->stats.syncp);
sq->stats.bytes += bytes;
sq->stats.packets += packets;
@@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
return;
if (__netif_tx_trylock(txq)) {
- free_old_xmit_skbs(sq);
+ free_old_xmit_skbs(sq, txq, true);
__netif_tx_unlock(txq);
}
@@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, vq2txq(sq->vq));
__netif_tx_lock(txq,...
2017 Apr 24
0
[PATCH net-next v2 2/5] virtio-net: transmit napi
...gt; near it explaining why it's there.
>
> I don't feel strongly. Was minutes away from sending a v3 with this
> code reverted, but I'll reinstate it and add a comment. Other planned
> changes based on Jason's feedback to v2:
>
> v2 -> v3:
> - convert __netif_tx_trylock to __netif_tx_lock on tx napi poll
> ensure that the handler always cleans, to avoid deadlock
> - unconditionally clean in start_xmit
> avoid adding an unnecessary "if (use_napi)" branch
> - remove virtqueue_disable_cb in patch 5/5
> a...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...->stats.syncp);
>>>>> sq->stats.bytes += bytes;
>>>>> sq->stats.packets += packets;
>>>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>>>> return;
>>>>> if (__netif_tx_trylock(txq)) {
>>>>> - free_old_xmit_skbs(sq);
>>>>> + free_old_xmit_skbs(sq, txq, true);
>>>>> __netif_tx_unlock(txq);
>>>>> }
>>>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budge...
2019 Jan 02
2
[PATCH RFC 1/2] virtio-net: bql support
...->stats.syncp);
>>>>> sq->stats.bytes += bytes;
>>>>> sq->stats.packets += packets;
>>>>> @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
>>>>> return;
>>>>> if (__netif_tx_trylock(txq)) {
>>>>> - free_old_xmit_skbs(sq);
>>>>> + free_old_xmit_skbs(sq, txq, true);
>>>>> __netif_tx_unlock(txq);
>>>>> }
>>>>> @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budge...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> > struct netdev_queue *txq = netdev_get_tx_qu...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> > struct netdev_queue *txq = netdev_get_tx_qu...
2018 Dec 26
0
[PATCH RFC 1/2] virtio-net: bql support
...bytes);
> > +
> > u64_stats_update_begin(&sq->stats.syncp);
> > sq->stats.bytes += bytes;
> > sq->stats.packets += packets;
> > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > return;
> > if (__netif_tx_trylock(txq)) {
> > - free_old_xmit_skbs(sq);
> > + free_old_xmit_skbs(sq, txq, true);
> > __netif_tx_unlock(txq);
> > }
> > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> > struct netdev_queue *txq = netdev_get_tx_qu...
2017 Apr 20
0
[PATCH net-next v2 2/5] virtio-net: transmit napi
...net_poll_tx(struct napi_struct *napi, int budget)
> +{
> + struct send_queue *sq = container_of(napi, struct send_queue, napi);
> + struct virtnet_info *vi = sq->vq->vdev->priv;
> + struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, vq2txq(sq->vq));
> +
> + if (__netif_tx_trylock(txq)) {
> + free_old_xmit_skbs(sq);
> + __netif_tx_unlock(txq);
> + }
> +
> + virtqueue_napi_complete(napi, sq->vq, 0);
> +
> + if (sq->vq->num_free >= 2 + MAX_SKB_FRAGS)
> + netif_tx_wake_queue(txq);
> +
> + return 0;
> +}
> +
> static int xm...
2018 Dec 30
0
[PATCH RFC 1/2] virtio-net: bql support
...n(&sq->stats.syncp);
> > > > sq->stats.bytes += bytes;
> > > > sq->stats.packets += packets;
> > > > @@ -1364,7 +1368,7 @@ static void virtnet_poll_cleantx(struct receive_queue *rq)
> > > > return;
> > > > if (__netif_tx_trylock(txq)) {
> > > > - free_old_xmit_skbs(sq);
> > > > + free_old_xmit_skbs(sq, txq, true);
> > > > __netif_tx_unlock(txq);
> > > > }
> > > > @@ -1440,7 +1444,7 @@ static int virtnet_poll_tx(struct napi_struct *napi, int budget)
>...
2017 Apr 18
8
[PATCH net-next v2 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v1 -> v2:
- disable by default
- disable unless affinity_hint_set
because cache misses add up to a third higher cycle cost,
e.g., in TCP_RR tests. This is not limited to the patch
that enables tx completion cleaning in rx napi.
- use trylock to
2017 Apr 18
8
[PATCH net-next v2 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v1 -> v2:
- disable by default
- disable unless affinity_hint_set
because cache misses add up to a third higher cycle cost,
e.g., in TCP_RR tests. This is not limited to the patch
that enables tx completion cleaning in rx napi.
- use trylock to