Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1305918 > unrolled thread
| Started by | Teresa Remmet <t.remmet@phytec.de> |
|---|---|
| First post | 2016-01-11 08:50 +0100 |
| Last post | 2016-01-15 10:30 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
net: phy: SMSC LAN8710/LAN8720 high load Teresa Remmet <t.remmet@phytec.de> - 2016-01-11 08:50 +0100
Re: net: phy: SMSC LAN8710/LAN8720 high load Igor Plyatov <plyatov@gmail.com> - 2016-01-11 09:10 +0100
RE: phy: SMSC LAN8710/LAN8720 high load David Laight <David.Laight@ACULAB.COM> - 2016-01-12 12:40 +0100
Re: phy: SMSC LAN8710/LAN8720 high load Teresa Remmet <t.remmet@phytec.de> - 2016-01-15 10:30 +0100
| From | Teresa Remmet <t.remmet@phytec.de> |
|---|---|
| Date | 2016-01-11 08:50 +0100 |
| Subject | net: phy: SMSC LAN8710/LAN8720 high load |
| Message-ID | <qPFoJ-7Hy-3@gated-at.bofh.it> |
Hello,
we have noticed load issues on our AM335x boards with a LAN8710 phy while
cpu is idling using 4.4-rc8.
CPU: 0% usr 0% sys 0% nic 99% idle 0% io 0% irq 0% sirq
Load average: 1.21 1.16 1.00 1/84 372
We could track this down to the ethernet phy. And bisect the issue to the
following patch:
commit 776829de90c5972895db398993ddfa9417ff8b01
Author: Igor Plyatov <plyatov@gmail.com>
Date: Fri Aug 14 20:11:02 2015 +0300
net: phy: workaround for buggy cable detection by LAN8700 after cable plugging
* Due to HW bug, LAN8700 sometimes does not detect presence of energy in the
Ethernet cable in Energy Detect Power-Down mode (e.g while EDPWRDOWN bit is
set, the ENERGYON bit does not asserted sometimes). This is a common bug of
LAN87xx family of PHY chips.
* The lan87xx_read_status() was improved to acquire ENERGYON bit. Its previous
algorythm still not reliable on 100 % and sometimes skip cable plugging.
Signed-off-by: Igor Plyatov <plyatov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reverting the commit helped to make the load drop down to:
09:21:01 up 32 min, load average: 0.19, 0.17, 0.14
In both cases no ethernet cable as been connected.
We also struggle with the buggy cable detection issue, but this increase of load
doesn't seem acceptable.
Can someone else with a LAN87xx also reproduce this?
Regards
Teresa
[toc] | [next] | [standalone]
| From | Igor Plyatov <plyatov@gmail.com> |
|---|---|
| Date | 2016-01-11 09:10 +0100 |
| Message-ID | <qPFI6-83I-21@gated-at.bofh.it> |
| In reply to | #1305918 |
Dear Teresa,
> Hello,
>
> we have noticed load issues on our AM335x boards with a LAN8710 phy while
> cpu is idling using 4.4-rc8.
>
> CPU: 0% usr 0% sys 0% nic 99% idle 0% io 0% irq 0% sirq
> Load average: 1.21 1.16 1.00 1/84 372
>
> We could track this down to the ethernet phy. And bisect the issue to the
> following patch:
>
> commit 776829de90c5972895db398993ddfa9417ff8b01
> Author: Igor Plyatov <plyatov@gmail.com>
> Date: Fri Aug 14 20:11:02 2015 +0300
>
> net: phy: workaround for buggy cable detection by LAN8700 after cable plugging
> * Due to HW bug, LAN8700 sometimes does not detect presence of energy in the
> Ethernet cable in Energy Detect Power-Down mode (e.g while EDPWRDOWN bit is
> set, the ENERGYON bit does not asserted sometimes). This is a common bug of
> LAN87xx family of PHY chips.
> * The lan87xx_read_status() was improved to acquire ENERGYON bit. Its previous
> algorythm still not reliable on 100 % and sometimes skip cable plugging.
>
> Signed-off-by: Igor Plyatov <plyatov@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Reverting the commit helped to make the load drop down to:
>
> 09:21:01 up 32 min, load average: 0.19, 0.17, 0.14
>
> In both cases no ethernet cable as been connected.
>
> We also struggle with the buggy cable detection issue, but this increase of load
> doesn't seem acceptable.
It depends from scenarios of device usage and priorities of device
reliability.
Our device is industrial and work most of the time with Ethernet cable
plugged in.
In our case it is completely unacceptable to have buggy cable detection
and we can easily sacrifice some small CPU time.
Do you need to use device without Ethernet cable for a long time? Is
this critical?
Teresa, maybe you can improve CPU usage.
Try to play with number of cycles and msleep time in the cycle:
/* Wait max 640 ms to detect energy */
for (i = 0; i < 64; i++) {
/* Sleep to allow link test pulses to be sent */
msleep(10);
But you need to keep overall duration >= 640 ms and make many long tests
after modification to be sure in reliable cable detection.
Best wishes.
--
Igor Plyatov
[toc] | [prev] | [next] | [standalone]
| From | David Laight <David.Laight@ACULAB.COM> |
|---|---|
| Date | 2016-01-12 12:40 +0100 |
| Subject | RE: phy: SMSC LAN8710/LAN8720 high load |
| Message-ID | <qQ5sS-fW-1@gated-at.bofh.it> |
| In reply to | #1305918 |
From: Teresa Remmet > Sent: 11 January 2016 07:42 > we have noticed load issues on our AM335x boards with a LAN8710 phy while > cpu is idling using 4.4-rc8. > > CPU: 0% usr 0% sys 0% nic 99% idle 0% io 0% irq 0% sirq > Load average: 1.21 1.16 1.00 1/84 372 The 'Load average' value is mostly meaningless. It includes any process/thread that is sleeping uninterruptably - even if the process is never woken (or is only woken for short periods). If you have a kernel thread that you don't want affected by signals (exits on some request to the driver) then you end up increasing the 'load average'. David
[toc] | [prev] | [next] | [standalone]
| From | Teresa Remmet <t.remmet@phytec.de> |
|---|---|
| Date | 2016-01-15 10:30 +0100 |
| Subject | Re: phy: SMSC LAN8710/LAN8720 high load |
| Message-ID | <qR8RJ-464-27@gated-at.bofh.it> |
| In reply to | #1307295 |
Hello David, Am Dienstag, den 12.01.2016, 11:33 +0000 schrieb David Laight: > From: Teresa Remmet > > Sent: 11 January 2016 07:42 > > we have noticed load issues on our AM335x boards with a LAN8710 phy while > > cpu is idling using 4.4-rc8. > > > > CPU: 0% usr 0% sys 0% nic 99% idle 0% io 0% irq 0% sirq > > Load average: 1.21 1.16 1.00 1/84 372 > > The 'Load average' value is mostly meaningless. > It includes any process/thread that is sleeping uninterruptably - even > if the process is never woken (or is only woken for short periods). > > If you have a kernel thread that you don't want affected by signals > (exits on some request to the driver) then you end up increasing the > 'load average'. thank you for your explanation. But I'm still worried that waiting so long in this function might be a problem. When I look at the function duration of lan87xx_read_status it takes in average about 1277869 us. When disabling the the power detect mode the time drops down to 555.326 us. As disabling over device tree does not work correct for lan87xx a patch follows. Teresa > > David >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web