netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers
@ 2013-03-27 14:41 Mugunthan V N
  2013-03-27 14:41 ` [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue Mugunthan V N
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mugunthan V N @ 2013-03-27 14:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-omap, Mugunthan V N

This patch series improves network performance of TI CPSW and Davinci EMAC
drivers during bulk transfer. During heavy Tx load CPDMA may run out of
descriptors and tx queue is stopped. When it descriptors are available it
is reported to the stack via netif_start_queue which doesn't schedule tx
queue immediately, so there can be dead time during continuous transfer,
this can be fixed by using netif_wake_queue api which will schedule tx queue
immediately.

Mugunthan V N (2):
  drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting
    tx queue
  drivers: net: ethernet: davinci_emac: use netif_wake_queue() while
    restarting tx queue

 drivers/net/ethernet/ti/cpsw.c         |    2 +-
 drivers/net/ethernet/ti/davinci_emac.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue
  2013-03-27 14:41 [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers Mugunthan V N
@ 2013-03-27 14:41 ` Mugunthan V N
  2013-03-27 14:55   ` Eric Dumazet
  2013-03-27 14:42 ` [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: " Mugunthan V N
  2013-03-27 18:10 ` [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Mugunthan V N @ 2013-03-27 14:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-omap, Mugunthan V N

To restart tx queue use netif_wake_queue() intead of netif_start_queue()
so that net schedule will restart transmission immediately which will
increase network performance while doing huge data transfers.

Reported-by: Dan Franke <dan.franke@schneider-electric.com>
Suggested-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index f4be85b..61ecebf 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -458,7 +458,7 @@ static void cpsw_tx_handler(void *token, int len, int status)
 	 * queue is stopped then start the queue as we have free desc for tx
 	 */
 	if (unlikely(netif_queue_stopped(ndev)))
-		netif_start_queue(ndev);
+		netif_wake_queue(ndev);
 	cpts_tx_timestamp(priv->cpts, skb);
 	priv->stats.tx_packets++;
 	priv->stats.tx_bytes += len;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: use netif_wake_queue() while restarting tx queue
  2013-03-27 14:41 [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers Mugunthan V N
  2013-03-27 14:41 ` [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue Mugunthan V N
@ 2013-03-27 14:42 ` Mugunthan V N
  2013-03-27 14:57   ` Eric Dumazet
  2013-03-27 18:10 ` [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Mugunthan V N @ 2013-03-27 14:42 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-omap, Mugunthan V N

To restart tx queue use netif_wake_queue() intead of netif_start_queue()
so that net schedule will restart transmission immediately which will
increase network performance while doing huge data transfers.

Reported-by: Dan Franke <dan.franke@schneider-electric.com>
Suggested-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 drivers/net/ethernet/ti/davinci_emac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 8121a3d..6a0b477 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1053,7 +1053,7 @@ static void emac_tx_handler(void *token, int len, int status)
 	 * queue is stopped then start the queue as we have free desc for tx
 	 */
 	if (unlikely(netif_queue_stopped(ndev)))
-		netif_start_queue(ndev);
+		netif_wake_queue(ndev);
 	ndev->stats.tx_packets++;
 	ndev->stats.tx_bytes += len;
 	dev_kfree_skb_any(skb);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue
  2013-03-27 14:41 ` [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue Mugunthan V N
@ 2013-03-27 14:55   ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-03-27 14:55 UTC (permalink / raw)
  To: Mugunthan V N; +Cc: netdev, davem, linux-omap

On Wed, 2013-03-27 at 20:11 +0530, Mugunthan V N wrote:
> To restart tx queue use netif_wake_queue() intead of netif_start_queue()
> so that net schedule will restart transmission immediately which will
> increase network performance while doing huge data transfers.
> 
> Reported-by: Dan Franke <dan.franke@schneider-electric.com>
> Suggested-by: Sriramakrishnan A G <srk@ti.com>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  drivers/net/ethernet/ti/cpsw.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index f4be85b..61ecebf 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -458,7 +458,7 @@ static void cpsw_tx_handler(void *token, int len, int status)
>  	 * queue is stopped then start the queue as we have free desc for tx
>  	 */
>  	if (unlikely(netif_queue_stopped(ndev)))
> -		netif_start_queue(ndev);
> +		netif_wake_queue(ndev);
>  	cpts_tx_timestamp(priv->cpts, skb);
>  	priv->stats.tx_packets++;
>  	priv->stats.tx_bytes += len;


Its a bug fix, suitable for net tree

Acked-by: Eric Dumazet <edumazet@google.com>

BTW, it seems cpsw_ndo_start_xmit() can race with cpsw_tx_handler().

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: use netif_wake_queue() while restarting tx queue
  2013-03-27 14:42 ` [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: " Mugunthan V N
@ 2013-03-27 14:57   ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-03-27 14:57 UTC (permalink / raw)
  To: Mugunthan V N; +Cc: netdev, davem, linux-omap

On Wed, 2013-03-27 at 20:12 +0530, Mugunthan V N wrote:
> To restart tx queue use netif_wake_queue() intead of netif_start_queue()
> so that net schedule will restart transmission immediately which will
> increase network performance while doing huge data transfers.
> 
> Reported-by: Dan Franke <dan.franke@schneider-electric.com>
> Suggested-by: Sriramakrishnan A G <srk@ti.com>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  drivers/net/ethernet/ti/davinci_emac.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
> index 8121a3d..6a0b477 100644
> --- a/drivers/net/ethernet/ti/davinci_emac.c
> +++ b/drivers/net/ethernet/ti/davinci_emac.c
> @@ -1053,7 +1053,7 @@ static void emac_tx_handler(void *token, int len, int status)
>  	 * queue is stopped then start the queue as we have free desc for tx
>  	 */
>  	if (unlikely(netif_queue_stopped(ndev)))
> -		netif_start_queue(ndev);
> +		netif_wake_queue(ndev);
>  	ndev->stats.tx_packets++;
>  	ndev->stats.tx_bytes += len;
>  	dev_kfree_skb_any(skb);


same remark here, its a bug fix

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers
  2013-03-27 14:41 [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers Mugunthan V N
  2013-03-27 14:41 ` [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue Mugunthan V N
  2013-03-27 14:42 ` [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: " Mugunthan V N
@ 2013-03-27 18:10 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-03-27 18:10 UTC (permalink / raw)
  To: mugunthanvnm; +Cc: netdev, linux-omap

From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Wed, 27 Mar 2013 20:11:58 +0530

> This patch series improves network performance of TI CPSW and Davinci EMAC
> drivers during bulk transfer. During heavy Tx load CPDMA may run out of
> descriptors and tx queue is stopped. When it descriptors are available it
> is reported to the stack via netif_start_queue which doesn't schedule tx
> queue immediately, so there can be dead time during continuous transfer,
> this can be fixed by using netif_wake_queue api which will schedule tx queue
> immediately.

Both applied to 'net'.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-27 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 14:41 [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers Mugunthan V N
2013-03-27 14:41 ` [net-next PATCH 1/2] drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue Mugunthan V N
2013-03-27 14:55   ` Eric Dumazet
2013-03-27 14:42 ` [net-next PATCH 2/2] drivers: net: ethernet: davinci_emac: " Mugunthan V N
2013-03-27 14:57   ` Eric Dumazet
2013-03-27 18:10 ` [net-next PATCH 0/2] network performance improvement patches for TI CPSW and Davinci EMAC drivers David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).