pthread: bump min stack size
authorJens Axboe <axboe@fb.com>
Thu, 14 Jul 2016 17:36:12 +0000 (10:36 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 14 Jul 2016 17:36:12 +0000 (10:36 -0700)
For some reason fio fails to create a thread with the stack size
set to the minimum. For now, let's just bump it to 2x the min size,
that seems to work...

Signed-off-by: Jens Axboe <axboe@fb.com>
gettime-thread.c
verify.c

index 6dc1486..19541b4 100644 (file)
@@ -71,7 +71,7 @@ int fio_start_gtod_thread(void)
                return 1;
 
        pthread_attr_init(&attr);
-       pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
+       pthread_attr_setstacksize(&attr, 2 * PTHREAD_STACK_MIN);
        ret = pthread_create(&gtod_thread, &attr, gtod_thread_main, mutex);
        pthread_attr_destroy(&attr);
        if (ret) {
index 58f37ae..9a96fbb 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -1290,7 +1290,7 @@ int verify_async_init(struct thread_data *td)
        pthread_attr_t attr;
 
        pthread_attr_init(&attr);
-       pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
+       pthread_attr_setstacksize(&attr, 2 * PTHREAD_STACK_MIN);
 
        td->verify_thread_exit = 0;