From: Jens Axboe Date: Wed, 29 Oct 2014 14:23:46 +0000 (-0600) Subject: Merge branch 'optimize-busy-poll' of https://github.com/ketor/fio X-Git-Tag: fio-2.1.14~22 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=8eb3987ca02cdec4ebbee596b4638531b786cc9d 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. --- 8eb3987ca02cdec4ebbee596b4638531b786cc9d