aio: Skip timer for io_getevents if timeout=0
authorFam Zheng <[email protected]>
Thu, 6 Nov 2014 12:44:36 +0000 (20:44 +0800)
committerBenjamin LaHaise <[email protected]>
Sat, 13 Dec 2014 22:50:20 +0000 (17:50 -0500)
commit5f785de588735306ec4d7c875caf9d28481c8b21
tree7f405dcbe7e4b53d554ee6e4040a331a505dcd92
parente4a0d3e720e7e508749c1439b5ba3aff56c92976
aio: Skip timer for io_getevents if timeout=0

In this case, it is basically a polling. Let's not involve timer at all
because that would hurt performance for application event loops.

In an arbitrary test I've done, io_getevents syscall elapsed time
reduces from 50000+ nanoseconds to a few hundereds.

Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Benjamin LaHaise <[email protected]>
fs/aio.c