SMP on TD-W8980


#1

Hi, do I need to compile a custom image if I want SMP on xrx200 devices like the TD-W8980?


How can we make the lantiq xrx200 devices faster
#2

I do not know your device exactly, does it have FXS-ports ?
SMP support normally inside xrx200 kernel-config.
But on many xrx200 it is deactivated because SMP and the Voicemaschine for the FXS-ports does not work to the same time.
see this thread: https://forum.openwrt.org/viewtopic.php?id=62696 on post 76 is eventuell a solution for you.
It is possible to build an image by using Imagebuilder + SDK


#3

Thank you for pointing to relevant information.
I have a TP-Link TDW8980 which doesn't have FXS ports:

# cat /proc/cmdline
console=ttyLTQ0,115200

# cat /proc/cpuinfo 
system type             : xRX200 rev 1.2
machine                 : TDW8980 - TP-LINK TD-W8980
processor               : 0
cpu model               : MIPS 34Kc V5.6
BogoMIPS                : 332.54
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Would it be possible to activate SMP by adding "smp" to the bootargs without going to rebuild a custom image?
Would be nice to have LEDE releases with SMP enabled for VRX devices that come without FXS ports but that doesn't seem to be the case so far, at least for the TDW8980.


#4

No, for enabling SMP the bootargs should not contain the word: "nosmp"
But it works by the latest shnapshoot only.
Sorry i forget that.
I do a look inside the target/linux/lantiq/dts/TDW89X0.dtsi
It should work out off the box, but on the snapshot only.


#5

I upgraded to latest snapshot and I can confirm that SMP is now enabled:). Sadly this device seems to be too slow to sustain nat+pppoe encapsulation on a 100mbit VDSL even with a second core as I barely get 80mbit downstream. It is certainly of some help, though.


#6

I guess there is some other things are wrong, on an Astoria VGV7510KW22 (an other VR9 device) i get 70-80Mbit/s on one core
and reach the 95Mbit on 2 cores. (It is the maximum speed because 100Mbit device)
what will happen when you print out the DSL status
/etc/init.d/dsl_control status

Have you do some equal measuring against a working router ?


#7
root@ceres:~# /etc/init.d/dsl_control status
ATU-C Vendor ID:                          Broadcom 177.28
ATU-C System Vendor ID:                   Broadcom
Chipset:                                  Lantiq-VRX200 Unknown
Firmware Version:                         5.8.1.8.1.6
API Version:                              4.17.18.6
XTSE Capabilities:                        0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2
Annex:                                    B
Line Mode:                                G.993.2 (VDSL2)
Profile:                                  17a
Line State:                               UP [0x801: showtime_tc_sync]
Forward Error Correction Seconds (FECS):  Near: 0 / Far: 15478
Errored seconds (ES):                     Near: 0 / Far: 67
Severely Errored Seconds (SES):           Near: 0 / Far: 0
Loss of Signal Seconds (LOSS):            Near: 0 / Far: 0
Unavailable Seconds (UAS):                Near: 47 / Far: 47
Header Error Code Errors (HEC):           Near: 0 / Far: 0
Non Pre-emtive CRC errors (CRC_P):        Near: 0 / Far: 0
Pre-emtive CRC errors (CRCP_P):           Near: 0 / Far: 0
Power Management Mode:                    L0 - Synchronized
Latency [Interleave Delay]:               0.13 ms [Fast]   0.0 ms [Fast]
Data Rate:                                Down: 97.601 Mb/s / Up: 21.382 Mb/s
Line Attenuation (LATN):                  Down: 9.7 dB / Up: 10.9 dB
Signal Attenuation (SATN):                Down: 9.7 dB / Up: 10.7 dB
Noise Margin (SNR):                       Down: 6.2 dB / Up: 8.0 dB
Aggregate Transmit Power (ACTATP):        Down: -20.4 dB / Up: 11.8 dB
Max. Attainable Data Rate (ATTNDR):       Down: 101.405 Mb/s / Up: 26.854 Mb/s
Line Uptime Seconds:                      245329
Line Uptime:                              2d 20h 8m 49s

After some more tests I've found that interrupts don't get evenly distributed across available cores, with irqbalance being used or not:

> root@ceres:~# cat /proc/interrupts 
>            CPU0       CPU1                                                                                                                                                                                          
>   0:    1269944    3190965      MIPS   0  IPI_resched                                                                                                                                                               
>   1:     379636   12215401      MIPS   1  IPI_call                                                                                                                                                                  
>   7:   65161202   64454202      MIPS   7  timer                                                                                                                                                                     
>  22:    1601124          0       icu  22  spi_rx                                                                                                                                                                    
>  23:     106349          0       icu  23  spi_tx
>  24:          0          0       icu  24  spi_err
>  62:          0          0       icu  62  1e101000.ifxhcd, dwc2_hsotg:usb1
>  63:   13608652          0       icu  63  mei_cpe
>  72:   16459620          0       icu  72  vrx200_rx
>  73:   23624689          0       icu  73  vrx200_tx
>  75:          0          0       icu  75  vrx200_tx_2
>  91:    1007112          0       icu  91  1e106000.ifxhcd, dwc2_hsotg:usb2
>  96:   32790400          0       icu  96  ptm_mailbox_isr
> 112:       1491          0       icu 112  asc_tx
> 113:          0          0       icu 113  asc_rx
> 114:          0          0       icu 114  asc_err
> 126:          0          0       icu 126  gptu
> 127:          0          0       icu 127  gptu
> 128:          0          0       icu 128  gptu
> 129:          0          0       icu 129  gptu
> 130:          0          0       icu 130  gptu
> 131:          0          0       icu 131  gptu
> 144:   48007505          0       icu 144  ath9k
> 161:          0          0       icu 161  ifx_pcie_rc0
> ERR:          0

I don't have another router to test on but if I activate a pppoe connection from the PC where I am writing (vdsl interface is bridged on br-lan on the router), I can get stable 10-11MB/s downloads, whereas if it is the router to be used as pppoe client, the same download tests fluctuate between 6 and 8MB/s.

Edit: forgot to say that cpu load on the router is around 1-2% when idling


Xrx200 IRQ balancing between VPEs
How can we make the lantiq xrx200 devices faster
#8

xRX200 rev 1.2 is a single core CPU + one thread.
And switch driver have problems with SMP enabled.

You can use this the device just as plain Modem and use a other router. only for PPPoA is this not possibil.


#9

It all makes sense now. Maybe It would be better to revert snapshot releases to single core, until interoperability problems with switch driver are sorted out, at least.


#10

xRX200 rev 1.2 is a single core CPU + one thread.

Actually xRX200 reports 1 core, 2 VPE and 4 TC. The VPEs are something like cores of x86 and TCs are IMO "hyperthreads" which can be shared between VPE.

Actually there was a functionality in kernel to have all TC as CPUs, so xRX200 can have 4 CPUs, but SMTC code was removed.