Could you kindly elaborate??
TIA
Could you kindly elaborate??
TIA
Ι answered to another user asking how to flash via serial
I have literally just unboxed one, opened the case, fitted a JST plug with flyleads, put the thing back together with the flyleads out through a slot in the base, connected to a USB to serial adapter and then followed the instructions to the letter.
I now have a working device with OpenWRT on it.
Maybe you need to explain exactly where you're struggling?
Very close to your solution, but distributes all interrupts except for ce* (changing affinity on these will crash the wifi firmware) and arch* (these are spread around correctly already).
I put this script as a service in /etc/init.d/irqbalance-manual and enable it (service irqbalance-manual enable
):
#!/bin/sh /etc/rc.common
START=13
USE_PROCD=1
AFFINITY_MIN=2
AFFINITY_MAX=8
AFFINITY_ALL="$(printf %x $(( AFFINITY_MAX * 2 - 1 )))"
set_affinities() {
local callback="$1" irq desc ret=0
sed -nre 's!^[[:space:]]*([0-9]+):[[:space:]]+.*[[:space:]]GIC-0[[:space:]]+[0-9]+[[:space:]]+(Level|Edge)[[:space:]]+(.+)$!\1 \3! p' /proc/interrupts | \
while read irq desc
do
case "$desc" in
arch*) ;;
ce*) ;;
*) "$callback" "/proc/irq/$irq/smp_affinity" || ret=1 ;;
esac
done
return $ret
}
set_affinity_per_cpu() {
local procfile="$1" ret=0
echo "$AFFINITY" > "$procfile" || ret=$?
if [ $AFFINITY -ge $AFFINITY_MAX ]
then
AFFINITY=$AFFINITY_MIN
else
AFFINITY=$(( AFFINITY * 2 ))
fi
return $ret
}
set_affinity_shared() {
local procfile="$1" ret=0
echo "$AFFINITY_ALL" > "$procfile" || ret=$?
return $ret
}
start_service() {
reload
}
reload_service() {
AFFINITY=$AFFINITY_MIN
set_affinities set_affinity_per_cpu
}
stop_service() {
set_affinities set_affinity_shared
}
/proc/interrupts:
CPU0 CPU1 CPU2 CPU3
9: 0 0 0 0 GIC-0 39 Level arch_mem_timer
13: 6599565 6186415 7471758 16583578 GIC-0 20 Level arch_timer
16: 2 0 0 0 GIC-0 354 Edge smp2p
17: 0 0 0 0 GIC-0 216 Level 4a9000.thermal-sensor
18: 0 0 0 0 GIC-0 239 Level bam_dma
21: 0 0 0 0 GIC-0 270 Level bam_dma
22: 5 0 0 0 GIC-0 340 Level msm_serial0
23: 35107 0 0 110212 GIC-0 178 Level bam_dma
24: 0 0 0 0 GIC-0 35 Edge wdt_bark
25: 0 0 0 0 GIC-0 357 Edge q6v5 wdog
29: 5 0 0 0 GIC-0 348 Edge ce0
30: 12446392 0 0 0 GIC-0 347 Edge ce1
31: 18653030 0 0 0 GIC-0 346 Edge ce2
32: 473055 0 0 0 GIC-0 343 Edge ce3
34: 0 0 0 0 GIC-0 443 Edge ce5
36: 677883 0 0 0 GIC-0 72 Edge ce7
38: 0 0 0 0 GIC-0 334 Edge ce9
39: 0 0 0 0 GIC-0 333 Edge ce10
40: 0 0 0 0 GIC-0 69 Edge ce11
47: 0 0 0 0 GIC-0 323 Edge reo2ost-exception
48: 0 187429 0 0 GIC-0 322 Edge wbm2host-rx-release
49: 0 0 577 0 GIC-0 321 Edge reo2host-status
50: 0 0 0 327051 GIC-0 320 Edge reo2host-destination-ring4
51: 0 219132 0 0 GIC-0 271 Edge reo2host-destination-ring3
52: 0 0 226751 0 GIC-0 268 Edge reo2host-destination-ring2
53: 0 0 0 2003466 GIC-0 267 Edge reo2host-destination-ring1
57: 2 13640697 0 0 GIC-0 263 Edge ppdu-end-interrupts-mac3
58: 0 0 0 0 GIC-0 262 Edge ppdu-end-interrupts-mac2
59: 3 0 0 7853447 GIC-0 261 Edge ppdu-end-interrupts-mac1
60: 1 0 0 0 GIC-0 260 Edge rxdma2host-monitor-status-ring-mac3
61: 0 0 0 0 GIC-0 256 Edge rxdma2host-monitor-status-ring-mac2
62: 1 0 0 0 GIC-0 255 Edge rxdma2host-monitor-status-ring-mac1
63: 1 0 0 0 GIC-0 235 Edge host2rxdma-host-buf-ring-mac3
64: 0 0 0 0 GIC-0 215 Edge host2rxdma-host-buf-ring-mac2
65: 0 0 0 0 GIC-0 212 Edge host2rxdma-host-buf-ring-mac1
66: 0 0 0 0 GIC-0 211 Edge rxdma2host-destination-ring-mac3
67: 0 0 0 0 GIC-0 210 Edge rxdma2host-destination-ring-mac2
68: 0 0 0 0 GIC-0 209 Edge rxdma2host-destination-ring-mac1
73: 0 54076 0 0 GIC-0 191 Edge wbm2host-tx-completions-ring3
74: 0 0 1571553 0 GIC-0 190 Edge wbm2host-tx-completions-ring2
75: 0 0 0 13208 GIC-0 189 Edge wbm2host-tx-completions-ring1
77: 16 0 0 0 GIC-0 47 Edge cpr3
78: 0 0 4790717 0 GIC-0 377 Level edma_txcmpl
79: 0 0 0 0 GIC-0 385 Level edma_rxfill
80: 0 5254738 0 0 GIC-0 393 Level edma_rxdesc
81: 0 0 0 0 GIC-0 376 Level edma_misc
82: 0 0 0 0 pmic_arb 51380237 Edge pm-adc5
83: 0 0 0 0 smp2p 0 Edge q6v5 fatal
84: 1 0 0 0 smp2p 1 Edge q6v5 ready
85: 0 0 0 0 smp2p 2 Edge q6v5 handover
86: 0 0 0 0 smp2p 3 Edge q6v5 stop
87: 0 0 0 0 msmgpio 34 Edge keys
88: 0 0 0 0 msmgpio 63 Edge keys
89: 0 0 0 0 GIC-0 172 Level xhci-hcd:usb1
90: 63 0 0 0 GIC-0 353 Edge glink-native
IPI0: 9552 5659 11830 13262 Rescheduling interrupts
IPI1: 6229227 11523719 10657244 2664602 Function call interrupts
IPI2: 0 0 0 0 CPU stop interrupts
IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 0 0 Timer broadcast interrupts
IPI5: 4397 11996 6132 5917 IRQ work interrupts
IPI6: 0 0 0 0 CPU wake-up interrupts
Err: 0
I've noticed on openwrt as you, on ax3600 and ax9000 at a distance the upload is awful on Macbooks. Was going to investigate more and report but as you've noticed it seems maybe to be a more common issue.
In my case, an AX9000 on stock I can get (as an AP, connecting with a wired PC) with iperf3 about 2-300 Mbps upload, which matches an Asus AX88U in the same location (routers/AP in living room, testing from bedroom, through 1 plasterbord & 1 concrete wall, maybe 10m). With openwrt the upload is 10 Mbps at best. In the living room on openwrt the upload is similar to stock.
Tried with 2012 3x3 AC Macbook and 2022 2x2 AX Macbook both give similar results. With a Samsung Galaxy S8 (G950F) I can get ca 100+ Mbps upload testing with speedtest.net with openwrt so it seems to be openwrt combined with Macbooks in my limited testing where upload drops off heavily at range. Download matches stock at the same location.
Crashed the router 2 times when transferring files from usb, had to plug off - plug in the router.
Interesting.
I have a serial adapter plugged into the USB port and is working perfectly fine with IRQs handled by CPU3...
89: 595 0 0 456655 GIC-0 172 Level xhci-hcd:usb1
If you're using my script, it's easy to exclude the USB interrupts from IRQ balancing, add a new line in the case statement:
xhci*) ;;
as in:
case "$desc" in
arch*) ;;
ce*) ;;
xhci*) ;;
...
I have a usb SSD attached, transmission is using the disk 24/7 and samba4 occasionally. Do I need to install irqbalance? No?
This is a 20h result using @hnyman 's script
# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
9: 0 0 0 0 GIC-0 39 Level arch_mem_timer
13: 5408817 12560262 6089234 6028447 GIC-0 20 Level arch_timer
16: 2 0 0 0 GIC-0 354 Edge smp2p
17: 0 0 0 0 GIC-0 216 Level 4a9000.thermal-sensor
18: 0 0 0 0 GIC-0 239 Level bam_dma
21: 0 0 0 0 GIC-0 270 Level bam_dma
22: 4 0 0 0 GIC-0 340 Level msm_serial0
23: 148969 0 0 0 GIC-0 178 Level bam_dma
24: 0 0 0 0 GIC-0 35 Edge wdt_bark
25: 0 0 0 0 GIC-0 357 Edge q6v5 wdog
29: 5 0 0 0 GIC-0 348 Edge ce0
30: 1862749 0 0 0 GIC-0 347 Edge ce1
31: 32230 0 0 0 GIC-0 346 Edge ce2
32: 105688 0 0 0 GIC-0 343 Edge ce3
34: 0 0 0 0 GIC-0 443 Edge ce5
36: 1 0 0 0 GIC-0 72 Edge ce7
38: 0 0 0 0 GIC-0 334 Edge ce9
39: 0 0 0 0 GIC-0 333 Edge ce10
40: 0 0 0 0 GIC-0 69 Edge ce11
47: 0 0 0 0 GIC-0 323 Edge reo2ost-exception
48: 25903 0 0 0 GIC-0 322 Edge wbm2host-rx-release
49: 68 0 0 0 GIC-0 321 Edge reo2host-status
50: 0 0 0 109091 GIC-0 320 Edge reo2host-destination-ring4
51: 0 0 96983 0 GIC-0 271 Edge reo2host-destination-ring3
52: 0 89407 0 0 GIC-0 268 Edge reo2host-destination-ring2
53: 0 0 0 113326 GIC-0 267 Edge reo2host-destination-ring1
57: 1 0 0 0 GIC-0 263 Edge ppdu-end-interrupts-mac3
58: 0 0 0 0 GIC-0 262 Edge ppdu-end-interrupts-mac2
59: 1 0 0 620224 GIC-0 261 Edge ppdu-end-interrupts-mac1
60: 1 0 0 0 GIC-0 260 Edge rxdma2host-monitor-status-ring-mac3
61: 0 0 0 0 GIC-0 256 Edge rxdma2host-monitor-status-ring-mac2
62: 1 0 0 0 GIC-0 255 Edge rxdma2host-monitor-status-ring-mac1
63: 1 0 0 0 GIC-0 235 Edge host2rxdma-host-buf-ring-mac3
64: 0 0 0 0 GIC-0 215 Edge host2rxdma-host-buf-ring-mac2
65: 1 0 0 0 GIC-0 212 Edge host2rxdma-host-buf-ring-mac1
66: 0 0 0 0 GIC-0 211 Edge rxdma2host-destination-ring-mac3
67: 0 0 0 0 GIC-0 210 Edge rxdma2host-destination-ring-mac2
68: 0 0 0 0 GIC-0 209 Edge rxdma2host-destination-ring-mac1
73: 0 0 66211 0 GIC-0 191 Edge wbm2host-tx-completions-ring3
74: 0 121423 0 0 GIC-0 190 Edge wbm2host-tx-completions-ring2
75: 0 0 0 116932 GIC-0 189 Edge wbm2host-tx-completions-ring1
77: 35 0 0 0 GIC-0 47 Edge cpr3
78: 18319138 0 0 0 GIC-0 377 Level edma_txcmpl
79: 0 0 0 0 GIC-0 385 Level edma_rxfill
80: 13803650 0 0 0 GIC-0 393 Level edma_rxdesc
81: 0 0 0 0 GIC-0 376 Level edma_misc
82: 0 0 0 0 pmic_arb 51380237 Edge pm-adc5
83: 0 0 0 0 smp2p 0 Edge q6v5 fatal
84: 1 0 0 0 smp2p 1 Edge q6v5 ready
85: 0 0 0 0 smp2p 2 Edge q6v5 handover
86: 0 0 0 0 smp2p 3 Edge q6v5 stop
87: 0 0 0 0 msmgpio 34 Edge keys
88: 0 0 0 0 msmgpio 63 Edge keys
89: 1183828 0 0 0 GIC-0 172 Level xhci-hcd:usb1
90: 64 0 0 0 GIC-0 353 Edge glink-native
IPI0: 10332 9616 13842 14374 Rescheduling interrupts
IPI1: 2425221 5509045 5582703 5462254 Function call interrupts
IPI2: 0 0 0 0 CPU stop interrupts
IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 0 0 Timer broadcast interrupts
IPI5: 4645 4361 6784 4234 IRQ work interrupts
IPI6: 0 0 0 0 CPU wake-up interrupts
Err: 0
Well you cannot use the irqbalance package, it doesn't work or do anything.
But you seem to have been using the various scripts that statically assign CPU affinities to interrupts.
Speaking of that, I've been experiencing hangs during times of high traffic with the script I've posted yesterday. Sadly, nothing gets logged over remote logging and the unit needs a power-cycle to recover.
I'll try to configure netconsole to see if I can catch some log messages.
Wirelessly Attended sysupgrade to SNAPSHOT r23104 yesterday!
Seems we don't need to stop wpad
for sysupgrades from here on in?
It was pure luck
I got hangs in traffic test when I had balanced the edma IRQs (that seem to handle lan/wan wired), so I restricted my script to just selected ath11k IRQs.
You might test with edma IRQs left at core0.
Like: ?
case "$desc" in
arch*) ;;
ce*) ;;
xhci*) ;;
edma*) ;;
*) "$callback" "/proc/irq/$irq/smp_affinity" || ret=1 ;;
esac
I hope you have the serial to TTL cable handy
login as: root
root@172.16.17.1's password:
BusyBox v1.36.1 (2023-05-24 06:29:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r23104-ef98dc3b3e
-----------------------------------------------------
root@DL-WRX36:~# service irqbalance-manual status
active with no instances
Yes.
There is no running process (just as expected).
The init script from @fif simply sets the affinities and ends. There is no need for a permanent daemon process.
Has anyone tried with kernel 6.1 ?