[PATCH v2] stdlib: Tuned down tst-arc4random-thread internal parameters
Szabolcs Nagy
szabolcs.nagy@arm.com
Thu Jul 28 12:25:16 GMT 2022
The 07/27/2022 10:10, Adhemerval Zanella via Libc-alpha wrote:
> + /* Do not run more threads than the maximum of online CPUs. */
> + long int cpus = sysconf (_SC_NPROCESSORS_ONLN);
> + if (cpus != -1)
> + /* Limit the number to not overload the system. */
> + outer_threads = (cpus / 2) / inner_threads ?: 1;
on my glibc test system
$ getconf _NPROCESSORS_ONLN
160
$ nproc
16
$ taskset -c 0 getconf _NPROCESSORS_ONLN
160
$ taskset -c 0 nproc
1
this is in a cgroup with a fixed cpuset 0-15.
sched_getaffinity might be better for this.
More information about the Libc-alpha
mailing list