All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
@ 2014-10-07 13:04 ` Christophe Leroy
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe Leroy @ 2014-10-07 13:04 UTC (permalink / raw)
  To: Pantelis Antoniou, Vitaly Bordug; +Cc: linux-kernel, linuxppc-dev, netdev

When using a MPC8xx as a router, 'perf' shows a significant time spent in 
fs_enet_interrupt() and fs_enet_start_xmit().
'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
between spin_unlock_irqrestore() and the following instruction, hence in
interrupt handling. This is due to the TX complete interrupt that fires after
each transmitted packet.
This patchset first remove all non NAPI handling as NAPI has become the only
mode for RX, then adds NAPI for handling TX complete.
This improves NAT TCP throughput by 21% on MPC885 with FEC.

Tested on MPC885 with FEC.

[PATCH 1/2] net: fs_enet: Remove non NAPI RX
[PATCH 2/2] net: fs_enet: Add NAPI TX

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

---
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  | 211 ++++++---------------
 .../net/ethernet/freescale/fs_enet/fs_enet.h       |   9 +-
 .../net/ethernet/freescale/fs_enet/mac-fcc.c       |  29 +++
 .../net/ethernet/freescale/fs_enet/mac-fec.c       |  29 +++
 .../net/ethernet/freescale/fs_enet/mac-scc.c       |  29 +++
 linux/include/linux/fs_enet_pd.h                   |   1 -
 6 files changed, 147 insertions(+), 161 deletions(-)

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

* [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
@ 2014-10-07 13:04 ` Christophe Leroy
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe Leroy @ 2014-10-07 13:04 UTC (permalink / raw)
  To: Pantelis Antoniou, Vitaly Bordug; +Cc: netdev, linuxppc-dev, linux-kernel

When using a MPC8xx as a router, 'perf' shows a significant time spent in 
fs_enet_interrupt() and fs_enet_start_xmit().
'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
between spin_unlock_irqrestore() and the following instruction, hence in
interrupt handling. This is due to the TX complete interrupt that fires after
each transmitted packet.
This patchset first remove all non NAPI handling as NAPI has become the only
mode for RX, then adds NAPI for handling TX complete.
This improves NAT TCP throughput by 21% on MPC885 with FEC.

Tested on MPC885 with FEC.

[PATCH 1/2] net: fs_enet: Remove non NAPI RX
[PATCH 2/2] net: fs_enet: Add NAPI TX

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

---
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  | 211 ++++++---------------
 .../net/ethernet/freescale/fs_enet/fs_enet.h       |   9 +-
 .../net/ethernet/freescale/fs_enet/mac-fcc.c       |  29 +++
 .../net/ethernet/freescale/fs_enet/mac-fec.c       |  29 +++
 .../net/ethernet/freescale/fs_enet/mac-scc.c       |  29 +++
 linux/include/linux/fs_enet_pd.h                   |   1 -
 6 files changed, 147 insertions(+), 161 deletions(-)

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

* Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
  2014-10-07 13:04 ` Christophe Leroy
@ 2014-10-08 20:03   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-10-08 20:03 UTC (permalink / raw)
  To: christophe.leroy
  Cc: pantelis.antoniou, vbordug, linux-kernel, linuxppc-dev, netdev

From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Tue,  7 Oct 2014 15:04:53 +0200 (CEST)

> When using a MPC8xx as a router, 'perf' shows a significant time spent in 
> fs_enet_interrupt() and fs_enet_start_xmit().
> 'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
> between spin_unlock_irqrestore() and the following instruction, hence in
> interrupt handling. This is due to the TX complete interrupt that fires after
> each transmitted packet.
> This patchset first remove all non NAPI handling as NAPI has become the only
> mode for RX, then adds NAPI for handling TX complete.
> This improves NAT TCP throughput by 21% on MPC885 with FEC.
> 
> Tested on MPC885 with FEC.
> 
> [PATCH 1/2] net: fs_enet: Remove non NAPI RX
> [PATCH 2/2] net: fs_enet: Add NAPI TX
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Series applied, thanks.

Any particular reason you didn't just put the TX reclaim calls into
the existing NAPI handler?

That's what other drivers do, because TX reclaim can make SKBs
available for RX packet receive on the local cpu.  So generally you
have one NAPI context that first does any pending TX reclaim, then
polls the RX ring for new packets.


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

* Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
@ 2014-10-08 20:03   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-10-08 20:03 UTC (permalink / raw)
  To: christophe.leroy; +Cc: netdev, linuxppc-dev, linux-kernel, vbordug

From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Tue,  7 Oct 2014 15:04:53 +0200 (CEST)

> When using a MPC8xx as a router, 'perf' shows a significant time spent in 
> fs_enet_interrupt() and fs_enet_start_xmit().
> 'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
> between spin_unlock_irqrestore() and the following instruction, hence in
> interrupt handling. This is due to the TX complete interrupt that fires after
> each transmitted packet.
> This patchset first remove all non NAPI handling as NAPI has become the only
> mode for RX, then adds NAPI for handling TX complete.
> This improves NAT TCP throughput by 21% on MPC885 with FEC.
> 
> Tested on MPC885 with FEC.
> 
> [PATCH 1/2] net: fs_enet: Remove non NAPI RX
> [PATCH 2/2] net: fs_enet: Add NAPI TX
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Series applied, thanks.

Any particular reason you didn't just put the TX reclaim calls into
the existing NAPI handler?

That's what other drivers do, because TX reclaim can make SKBs
available for RX packet receive on the local cpu.  So generally you
have one NAPI context that first does any pending TX reclaim, then
polls the RX ring for new packets.

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

* Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
  2014-10-08 20:03   ` David Miller
@ 2014-10-09  5:23     ` leroy christophe
  -1 siblings, 0 replies; 6+ messages in thread
From: leroy christophe @ 2014-10-09  5:23 UTC (permalink / raw)
  To: David Miller
  Cc: pantelis.antoniou, vbordug, linux-kernel, linuxppc-dev, netdev


Le 08/10/2014 22:03, David Miller a écrit :
> From: Christophe Leroy <christophe.leroy@c-s.fr>
> Date: Tue,  7 Oct 2014 15:04:53 +0200 (CEST)
>
>> When using a MPC8xx as a router, 'perf' shows a significant time spent in
>> fs_enet_interrupt() and fs_enet_start_xmit().
>> 'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
>> between spin_unlock_irqrestore() and the following instruction, hence in
>> interrupt handling. This is due to the TX complete interrupt that fires after
>> each transmitted packet.
>> This patchset first remove all non NAPI handling as NAPI has become the only
>> mode for RX, then adds NAPI for handling TX complete.
>> This improves NAT TCP throughput by 21% on MPC885 with FEC.
>>
>> Tested on MPC885 with FEC.
>>
>> [PATCH 1/2] net: fs_enet: Remove non NAPI RX
>> [PATCH 2/2] net: fs_enet: Add NAPI TX
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Series applied, thanks.
>
> Any particular reason you didn't just put the TX reclaim calls into
> the existing NAPI handler?
Not really. I used the gianfar.c driver as a model.
>
> That's what other drivers do, because TX reclaim can make SKBs
> available for RX packet receive on the local cpu.  So generally you
> have one NAPI context that first does any pending TX reclaim, then
> polls the RX ring for new packets.
>
Is that a better approach ?


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

* Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX
@ 2014-10-09  5:23     ` leroy christophe
  0 siblings, 0 replies; 6+ messages in thread
From: leroy christophe @ 2014-10-09  5:23 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linuxppc-dev, linux-kernel, vbordug


Le 08/10/2014 22:03, David Miller a écrit :
> From: Christophe Leroy <christophe.leroy@c-s.fr>
> Date: Tue,  7 Oct 2014 15:04:53 +0200 (CEST)
>
>> When using a MPC8xx as a router, 'perf' shows a significant time spent in
>> fs_enet_interrupt() and fs_enet_start_xmit().
>> 'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
>> between spin_unlock_irqrestore() and the following instruction, hence in
>> interrupt handling. This is due to the TX complete interrupt that fires after
>> each transmitted packet.
>> This patchset first remove all non NAPI handling as NAPI has become the only
>> mode for RX, then adds NAPI for handling TX complete.
>> This improves NAT TCP throughput by 21% on MPC885 with FEC.
>>
>> Tested on MPC885 with FEC.
>>
>> [PATCH 1/2] net: fs_enet: Remove non NAPI RX
>> [PATCH 2/2] net: fs_enet: Add NAPI TX
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Series applied, thanks.
>
> Any particular reason you didn't just put the TX reclaim calls into
> the existing NAPI handler?
Not really. I used the gianfar.c driver as a model.
>
> That's what other drivers do, because TX reclaim can make SKBs
> available for RX packet receive on the local cpu.  So generally you
> have one NAPI context that first does any pending TX reclaim, then
> polls the RX ring for new packets.
>
Is that a better approach ?

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

end of thread, other threads:[~2014-10-09  5:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 13:04 [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX Christophe Leroy
2014-10-07 13:04 ` Christophe Leroy
2014-10-08 20:03 ` David Miller
2014-10-08 20:03   ` David Miller
2014-10-09  5:23   ` leroy christophe
2014-10-09  5:23     ` leroy christophe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.