blktrace: use number of configured cpus instead of online cpus
authorNathan Zimmer <nzimmer@sgi.com>
Mon, 15 Apr 2013 14:53:35 +0000 (09:53 -0500)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Aug 2013 18:13:26 +0000 (12:13 -0600)
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>
blktrace.c

index 89aaaac227bc2d3ed4a03f61a71e8396a2cc6f72..63125ab4d08f4ba954e1ec63ba84dbede716df43 100644 (file)
@@ -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;