am335x: cpsw at high broadcast load

2 messages, 1 author, 2016-04-05 · open the first message on its own page

am335x: cpsw at high broadcast load

From: Yegor Yefremov <hidden>
Date: 2015-07-31 12:22:30

We experience massive problems, when putting am335x based devices into
high broadcast load environment (customer reports). To reproduce the
issue we've written following Python script

#!/usr/bin/python
# Send UDP broadcast packets

myport = 50000

import sys, time
from socket import *

if len(sys.argv) == 2:
    myport = int(sys.argv[1])

s = socket(AF_INET, SOCK_DGRAM)
s.bind(('192.168.254.36', 0))
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)

while 1:
    #data = repr(time.time()) + '\n'
    data = "a"
    s.sendto(data, ('<broadcast>', myport))
    time.sleep(0.0001)

Just running this script on a host machine and invoking "top" on the
am335x machine results in sirq showing about 90% for 600MHz CPU and
3.18.x kernel. Below example of idle "top" output for the reference:

Mem: 13432K used, 217844K free, 64K shrd, 652K buff, 4956K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq

Then I tried 4.2.0-rc4 and sirq was about 80%, then I applied both

drivers: net: cpsw: remove  disable_irq/enable_irq as irq can be
    masked from cpsw itself
  drivers: net: cpsw: add separate napi for tx packet handling for
    performance improvment

and sirq lowered to about 50%, but I have also tried evil vendor tree

13 more lines

Re: am335x: cpsw at high broadcast load

From: Yegor Yefremov <hidden>
Date: 2016-04-05 08:19:32

Hi Mugunthan,

On Fri, Jul 31, 2015 at 2:22 PM, Yegor Yefremov
[off-list ref] wrote:
We experience massive problems, when putting am335x based devices into
high broadcast load environment (customer reports). To reproduce the
issue we've written following Python script

#!/usr/bin/python
# Send UDP broadcast packets

myport = 50000

import sys, time
from socket import *

if len(sys.argv) == 2:
    myport = int(sys.argv[1])

s = socket(AF_INET, SOCK_DGRAM)
s.bind(('192.168.254.36', 0))
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)

while 1:
    #data = repr(time.time()) + '\n'
    data = "a"
    s.sendto(data, ('<broadcast>', myport))
    time.sleep(0.0001)

Just running this script on a host machine and invoking "top" on the
am335x machine results in sirq showing about 90% for 600MHz CPU and
3.18.x kernel. Below example of idle "top" output for the reference:

Mem: 13432K used, 217844K free, 64K shrd, 652K buff, 4956K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq

Then I tried 4.2.0-rc4 and sirq was about 80%, then I applied both

drivers: net: cpsw: remove  disable_irq/enable_irq as irq can be
    masked from cpsw itself
  drivers: net: cpsw: add separate napi for tx packet handling for
    performance improvment

and sirq lowered to about 50%, but I have also tried evil vendor tree

8 more quoted lines

Could you please look at this issue. It is still valid for 4.5 and am335x.

Thanks.

Yegor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help