executor: reduce syscall blocking delay from 100ms to 20ms

Syscalls frequently block and this affects fuzzing speed.
20ms should be more than enough for a normal syscall to finish.
This commit is contained in:
Dmitry Vyukov 2017-01-20 23:53:40 +01:00
parent 02702eeef3
commit a8632569bf

View File

@ -351,12 +351,12 @@ retry:
for (;;) {
timespec ts = {};
ts.tv_sec = 0;
ts.tv_nsec = (100 - (now - start)) * 1000 * 1000;
ts.tv_nsec = (20 - (now - start)) * 1000 * 1000;
syscall(SYS_futex, &th->done, FUTEX_WAIT, 0, &ts);
if (__atomic_load_n(&th->done, __ATOMIC_RELAXED))
break;
now = current_time_ms();
if (now - start > 100)
if (now - start > 20)
break;
}
if (__atomic_load_n(&th->done, __ATOMIC_ACQUIRE))