ksoftirqd/x jumps to very high CPU when ifconfig wlanx down

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
erwin9
DD-WRT Novice


Joined: 30 Jul 2013
Posts: 18

PostPosted: Sat May 03, 2025 16:23    Post subject: ksoftirqd/x jumps to very high CPU when ifconfig wlanx down Reply with quote
Router/Version: Lynksys WRT1200ACv2
File/Kernel: r59660
Previous/Reset: r60832
Mode/Status: Gateway, SFE enabled
Issues/Errors: Very high ksoftirqd usage when wlan interface is down

Hello, I am currently on release r59660 (display value, the release number is r59661).
However, the problem that I am experiencing was existing before (I believe that I noticed it when the kernel went to 6.x ..).
And it is still on the latest r60832 to which I tried to upgrade today, although here that was apparently impacting my routing performance (very sloooow loading of pages), so I went back to r59660 for now (and I had to set my WAN setting back to eth0 on the GUI, else no WAN of course ..).


Context:
A few minutes after boot, I am shutting down wifi by script, using
Code:
ifconfig wlan0 down
and
Code:
ifconfig wlan1 down
and I rely on the SES button with an associated script to turn wifi on for 1 hour, after which a script set both interfaces down again (reason being that I do not want to have wifi waves 24/7 in the house when not needed).

Symptom:
On GUI, the cpu (Marvell Armada 385) is shown at 2.00 all the time a few minutes after boot.
So far, I thought that it was a display problem related to kernel 6.x, and didn't bother much about it (although I did find the cpu temperature higher than in my memories, so was a bit annoyed by that).

Today, because of the slow routing starting after a few minutes when I upgraded to r60832, I wondered if there was not a relation with me turning off the wifi.

I went back to r59660 to be able to navigate properly on the Internet (on this site Smile), and then made some experiments.

Experiments
Using top, I can see that:

When I set both wlan0 and wlan1 to down
ksoftirqd/0 and ksoftirqd/1 are both around 49.7%, that the idle% is at 0, that the Load average is at 2.0 (like on the GUI), and on GUI, I see that my cpu temperature is high at 73°C.

When I set one of them (wlan[x]) only down using ifconfig, and the other (wlan[1-x]) up, then the ksoftirqd/[x] "process" is at 0% or nearly, and the other one ksoftirqd/[1-x] is at a 49.7%.
So, say that from the situation where both are down, and both ksoftirqd/x are at 49.7%, I decide to set wlan0 up and to keep wlan1 down, then ksoftirqd/1 goes down to 0 nearly immediately, and ksoftirqd/0 stays at 49.7% (yes, there is an inversion in the numbers, this is not me making a typo !).
And my cpu temperature goes down to 69°C.

When I set both wlan0 and wlan1 up, then both ksoftirqd/x "processes" are at 0%, and my cpu temperature is at 64°C or below, which corresponds to my memories pre-kernel 6.x.


When I disable the WLAN interfaces on the GUI, through WIRELESS-><Intf wlanx>->NETWORK MODE = Disabled
then I do not see any rise in the ksoftirqd/x "processes", nor in temperature.


Question
Is there a bug, or am I doing things wrong by using ifconfig wlanX down ?

Should I use another command to bring down and up my wlan interfaces, and the wifi power ?


Last edited by erwin9 on Sun May 04, 2025 8:03; edited 2 times in total
Sponsor
erwin9
DD-WRT Novice


Joined: 30 Jul 2013
Posts: 18

PostPosted: Sat May 03, 2025 21:18    Post subject: Reply with quote
Note: I also tried 2 more experiments, from the situation where wlan0 and wlan1 are both active (and so both ksoftirqd/x are at 0.0%)

Code:
iwconfig wlan0 txpower off

and
Code:
service radio_off_0 start


In both cases, this turns wlan0 inactive, and immediately, ksoftirqd/1 goes at 49.7% or higher, and my cpu goes to 69°C.

In both cases, the only way to come back to normal cpu load/temperature, and to reactivate wlan0, is to issue
Code:
ifconfig wlan0 up
erwin9
DD-WRT Novice


Joined: 30 Jul 2013
Posts: 18

PostPosted: Wed May 07, 2025 7:33    Post subject: Reply with quote
One more experiment Smile

I downgraded to r53633, which is the last version with kernel 4.9 which was working for my WRT1200ACv2.

Result = there is no such effect/problem on 4.9, whether I do either ifconfig wlan0 down or ifconfig wlan1 down or both, the ksoftirqd/x "processes" stay quiet, and the cpu temperature is stable.

So the problem seems to happen only with kernels 6.x.


Also, when coming back to r59660, I noticed that the linkage between bringing down wlan0 or wlan1, and the number of the corresponding ksoftirqd/x "process" which is impacted, is in fact not so fixed. For example, just after my last reboot when coming back to r59660, I brought wlan0 down and it was ksoftirqd/0 which jumped to nearly 50%. However, right now, and no reset in between, when I bring it down again, this is ksoftirqd/1 which is impacted ..
So I presume that the link between ksoftirqd/x and wlanx is somewhat dynamic, and not necessarily related to the interface number Question
erwin9
DD-WRT Novice


Joined: 30 Jul 2013
Posts: 18

PostPosted: Thu May 08, 2025 11:36    Post subject: Reply with quote
Router/Version: Lynksys WRT1200ACv2
File/Kernel: r61025
Previous/Reset: Reset

To verify if there could be something in the configuration, I have reset it to factory when upgrading this morning to r61025.

Result: no difference, the problem is still there.

Therefore:
- This is not something coming from the previous config
- As I do a pretty standard non fancy config, there is little chance that the problem can come from the config at all
- This is not a hardware problem, since it doesn't occur with kernel 4.9, and it only starts with kernel 6.x versions

Does anyone here know of another way to turn off wifi than ifconfig wlanX down and than the other alternatives I already tried above ?

Does somebody know what the GUI "WIRELESS-><Intf wlanx>->NETWORK MODE = Disabled" does which I could try to reproduce from CLI, as this one doesn't trigger the problem ?

Thank you in advance for any hint or advice.
Gray8300
DD-WRT Novice


Joined: 28 May 2023
Posts: 19

PostPosted: Fri May 09, 2025 17:59    Post subject: Reply with quote
I can confirm this happens on WRT1900AC V1 as well, with r61025 (and likely earlier).

Disabling wlan that way results in continual significant CPU usage (and temperature increase) according to top.

This makes me wonder if the temporary CPU usage spikes I always see after boot/reboot are related to this (wlans not yet being up) and not all due to the normal boot processes. I've been trying to log the CPU usage info after boot via top in a startup script to check (to see if it's the same ksoftirqd/0 and /1 spike), however I don't think those are being called early enough in the boot process.

erwin9 wrote:
Does somebody know what the GUI "WIRELESS-><Intf wlanx>->NETWORK MODE = Disabled" does which I could try to reproduce from CLI, as this one doesn't trigger the problem ?


I looked into this a little and didn't find an easy solution that worked for me, someone who knows more about this would have to comment. From what I can guess, I think that changing that setting and applying it might result in several different processes/services being updated or restarted. Simply using nvram to set the wlan0_net_mode and wlan1_net_mode to disabled and committing it doesn't change anything, and I'm not sure which specific processes/services need to be re-run. I also tried the 'service radio_off start' and 'service radio_on start' commands - both of which "worked" (and both also caused a temporary CPU spike from ksoftirqd until the commands completed), my devices could no longer see the wifi networks, but the GUI was still implying the wifi was "active" and that was some activity with the wireless going on. Even after restarting them, I ran into a problem where my WAN wouldn't work at all for some reason and had to reboot the router.



terminal-0.76.1.13_2025-05-09_13-51-14.png
 Description:
 Filesize:  3.61 KB
 Viewed:  324 Time(s)

terminal-0.76.1.13_2025-05-09_13-51-14.png


erwin9
DD-WRT Novice


Joined: 30 Jul 2013
Posts: 18

PostPosted: Sat May 10, 2025 17:17    Post subject: Reply with quote
Thank you, I feel less alone Smile

If at least someone can give me a clue on where to look in the source code tree, I can try to search what the GUI "WIRELESS-><Intf wlanx>->NETWORK MODE = Disabled" does to see if possible to reproduce from CLI Idea Question
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum