Merge branch 'optimize-busy-poll' of https://github.com/ketor/fio
authorJens Axboe <axboe@fb.com>
Wed, 29 Oct 2014 14:23:46 +0000 (08:23 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 29 Oct 2014 14:23:46 +0000 (08:23 -0600)
Ketor writes:

Origin code use rbd_aio_is_complete to check if the io is complete.But
this function use mutex lock and unlock to get the complete result, this
will cause the thread context switch and lock wait latency. And also
because the lock and context switch latency is in the getevents thread,
will decrease the getevents speed and increase the test latency.

This patch go back to use an varible io_complete to check if the io is
complete. This variable is updated in the aiocb callback function and
will not influence the getevents speed.

In our practice, we run fio test jobs=1 iodepth=1 bs=4k busy_poll=1.
Before this patch: IOPS is 30930 After this patch: IOPS is 37300.  And
also after this patch we get avg 25us latency, is nearly equal to the
systemtap test result of the librbd randwrite process.

So I think this patch is realy needed.


Trivial merge