blktrace: use number of configured cpus instead of online cpus
PATCH 4/5 blktrace: use number of configured cpus instead of online cpus
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 <[email protected]>
Signed-off-by Nathan Zimmer <[email protected]>
--- blktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
blktrace.c +2 -2
@@ -2656,9 +2656,9 @@ int main(int argc, char *argv[])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;
Signature · 1 line
1.8.1.2