Author Topic: maxcpus=5  (Read 5654 times)

mithrandir

  • Full Member
  • ***
  • Posts: 193
    • View Profile
    • http://www.mygnu.de
maxcpus=5
« on: March 21, 2019, 07:06:11 pm »
Today, just out of interest I had a look at the kernel cmdline and noticed we are are restricted to 5 cpus:

root@gemini:/home/gemini# cat /proc/cmdline          
console=tty0 console=ttyMT0,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=OFZPU androidboot.hardware=mt6797 maxcpus=5 androidboot.verifiedbootstate=green bootopt=64S3,32N2,64N2 log_buf_len=4M printk.disable_uart=1 bootprof.pl_t=1127 bootprof.lk_t=2950 boot_reason=4 androidboot.serialno=TGRWNRQ8ORQKC6TK androidboot.bootreason=wdt_by_pass_pwk gpt=1 usb2jtag_mode=0

To prove this I tried while running sysbench ( sysbench  --test=threads --num-threads=99 run ) to see the count of enabled cpus:
root@gemini:/home/gemini# cat /proc/cpuinfo |grep proc|wc -l
5

The count of active cpus never went above 5 (as expected). Does anybody know the reason for this restriction? Has anybody already tried to increase this number, maybe to 10? Do we all have this restriction(might be a problem with my setup, but don't think so)? Where could this be changed (it is not part of the mkbootimg call)?
 
Mith
« Last Edit: March 21, 2019, 07:06:50 pm by mithrandir »

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
maxcpus=5
« Reply #1 on: March 22, 2019, 04:37:13 am »
Quote from: mithrandir
Do we all have this restriction(might be a problem with my setup, but don't think so)?
I don't know but I can confirm that I also see maxcpus=5 in the output of that command.
Gemini 4G Debian
OpenPandora with Debian

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
maxcpus=5
« Reply #2 on: March 22, 2019, 05:04:46 am »
I assumed it was related to the big.little ARM thing were we want to either be running the higher or lower powered cores. If anyone is running the latest android release (I'm still a few behind as I never use it), it would be very interesting to compare the Android side cmdline and kernel build parameters (probably extract-able from /proc/config.gz).

I was planning on checking this after they release the 8.1, but if anyone wants to do so sooner then there could still be interesting things to learn from the last release.

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
maxcpus=5
« Reply #3 on: March 22, 2019, 07:43:57 am »
This definitely did work in the past, i.e. running a heavy multi threaded process fired up all 10 CPU cores

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1278
    • View Profile
maxcpus=5
« Reply #4 on: March 22, 2019, 08:38:59 am »
Quote from: Adam Boardman
If anyone is running the latest android release (I'm still a few behind as I never use it), it would be very interesting to compare the Android side cmdline and kernel build parameters (probably extract-able from /proc/config.gz).
I'm running the latest Android release, I have checked under Termux though I couldn't find neither /proc/config.gz nor the /boot folder itself. I guess this might be retrieved from the kernel sources (https://github.com/dguidipc/gemini-android-kernel-3.18/tree/master/kernel-3.18/arch/arm/configs), though I believe there's no guarantee that the config file there was the one used for the latest compiled kernel.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

mithrandir

  • Full Member
  • ***
  • Posts: 193
    • View Profile
    • http://www.mygnu.de
maxcpus=5
« Reply #5 on: March 22, 2019, 01:23:31 pm »
Quote from: Varti
I'm running the latest Android release, I have checked under Termux though I couldn't find neither /proc/config.gz nor the /boot folder itself. I guess this might be retrieved from the kernel sources (https://github.com/dguidipc/gemini-android-kernel-3.18/tree/master/kernel-3.18/arch/arm/configs), though I believe there's no guarantee that the config file there was the one used for the latest compiled kernel.

Varti

It is not related to kernel configuration. From kernel config:
CONFIG_NR_CPUS=10
CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O "

Mith

Thiago Alves

  • Newbie
  • *
  • Posts: 12
    • View Profile
maxcpus=5
« Reply #6 on: August 03, 2019, 11:56:14 pm »
I tested this on a Debian chroot running on Android 7, and I can confirm that on the Android side it shows all CPUs. Here is /proc/cpuinfo while sysbench is running:
Code: [Select]
Processor    : AArch64 Processor rev 4 (aarch64)
processor    : 0
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 1
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 2
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 3
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 4
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 5
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 6
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 7
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 8
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd08
CPU revision    : 1

processor    : 9
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd08
CPU revision    : 1

Hardware    : MT6797X

Lito

  • Newbie
  • *
  • Posts: 4
    • View Profile
maxcpus=5
« Reply #7 on: February 18, 2020, 11:11:34 am »
Quote from: Thiago Alves
I tested this on a Debian chroot running on Android 7, and I can confirm that on the Android side it shows all CPUs. Here is /proc/cpuinfo while sysbench is running:
Code: [Select]
Processor    : AArch64 Processor rev 4 (aarch64)
processor    : 0
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 1
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 2
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 3
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 4
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 5
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 6
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 7
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor    : 8
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd08
CPU revision    : 1

processor    : 9
model name    : AArch64 Processor rev 4 (aarch64)
BogoMIPS    : 26.00
BogoMIPS    : 26.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer    : 0x41
CPU architecture: 8
CPU variant    : 0x0
CPU part    : 0xd08
CPU revision    : 1

Hardware    : MT6797X

Hi
to me its working just fine see picture below  :