summaryrefslogtreecommitdiff
path: root/blktrace.c
diff options
context:
space:
mode:
authorNathan Zimmer <nzimmer@sgi.com>2013-04-15 09:53:35 -0500
committerJens Axboe <axboe@kernel.dk>2013-08-01 12:13:26 -0600
commit67313d8f411fe08f3f8a0c94ad2cf45bf569f0f8 (patch)
tree8caddf1148255a77cff97cb23e4b043bcfc6f7f2 /blktrace.c
parentfb69749415ae2bd7c3180605d01a5a39f3bd988f (diff)
downloadblktrace-67313d8f411fe08f3f8a0c94ad2cf45bf569f0f8.tar.gz
blktrace-67313d8f411fe08f3f8a0c94ad2cf45bf569f0f8.tar.bz2
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 <axboe@kernel.dk> Signed-off-by: Nathan Zimmer <nzimmer@sgi.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'blktrace.c')
-rw-r--r--blktrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blktrace.c b/blktrace.c
index 89aaaac..63125ab 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -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;