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)
commit8eb3987ca02cdec4ebbee596b4638531b786cc9d
treee6878178b5f0dc22bd482de4ca86fbdec67f7fa8
parent1baee6efc1428150ef674db583d9ff9522ce0e52
parentb8ecbef62d45629aae98061903879f4e65cd7cfe
Merge branch 'optimize-busy-poll' of https://github.com/ketor/fio

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.