We want to run on all online processors. However is there is a hole in the
online cpumask this won't happen. We need the number of configured processors
instead of online.
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
setlocale(LC_NUMERIC, "en_US");
pagesize = getpagesize();
- ncpus = sysconf(_SC_NPROCESSORS_ONLN);
+ ncpus = sysconf(_SC_NPROCESSORS_CONF);
if (ncpus < 0) {
- fprintf(stderr, "sysconf(_SC_NPROCESSORS_ONLN) failed %d/%s\n",
+ fprintf(stderr, "sysconf(_SC_NPROCESSORS_CONF) failed %d/%s\n",
errno, strerror(errno));
ret = 1;
goto out;