Possible cause of R7800 latency issues

As far as I can tell the huge 40%-80% cpu spike is gone. Now I only see ~7% spike once in a while across different kworker thread and only observable with htop -d1. With default htop (I think -d20) refresh rate I can only see 0.7% bump once in a while.

Not sure what this means to the latency spike though - my firmware still has the timer frequency and voluntary preemption options enabled.

My change is a quick dirty hack for testing and I would be ashamed to share the patch out - here's what I did:

In

/target/linux/generic/files/drivers/net/phy/ar8216.c

hardcode

ar8xxx_mib_capture

ar8xxx_mib_flush

to return

-ETIMEDOUT

disable

ar8xxx_mib_fetch_port_stat

and comment out

/* Enable MIB counters */
ar8xxx_rmw(priv, AR8216_REG_MIB_FUNC, AR8216_MIB_FUNC | AR8236_MIB_EN,
	   (AR8216_MIB_FUNC_NO_OP << AR8216_MIB_FUNC_S) |
AR8236_MIB_EN);

swconfig dump:
On the r7800 without the patch:

On the r7500 with my hack:

The mib counter stats are gone as expected.

2 Likes