Disabling CPU cores

Hello. How can I disable CPU cores on BananaPi? “maxcpus=N” in “cmdline.txt” gives nothing. Thanks

have you tried

root@host: echo 0 > /sys/devices/system/cpu/cpuX/online

to enable it make “echo 1”

Thanks for reply. Didn’t work unfortunately.

You have replaced X by cpu (0-n) you want to disable? You see in top (multicpu view) which cores are disabled

sure I tried this and checked with htop

Ok. Interesting. I found that my Bananapi (model Zero) uses file ‘/boot/bananapi/bpi-m2z/linux4.4/720p/uEnv.txt’ for grabbing a boot parameters. After adding ‘maxcpus=2’ to a given line there are only 2 cores active during boot (2 Tuxes :slight_smile: ) but after entering the OS after login there are all cores active. BUT now I can “hotplugging” CPU cores with a command given above. So it kind of works. Maybe someone knows exaclty why is that. I leve that topic here. Maybe useful.

Related page:

I guess there is a script which reenables cpus after bootup. But good to know you have foud right config. This enables you to change uboots environment e.g.if you want to boot another kernel