Re: O_NONBLOCK is NOOP on block devices

From: M vd S
Date: Wed Mar 10 2010 - 12:10:11 EST


On 3/10/10 2:21 PM, Jeff Moyer wrote:
M vd S <mvds.00@xxxxxxxxx> writes:
I also briefly tried aio_* and the libaio interface. The former is not
really asynchronous - all requests are put in one separate thread
where they will be executed in order, i.e. blocking, so you don't get
any advantage from NCQ or data that was cached by the disk or the
kernel. The latter apparently ends in an io_submit() which will block
until all queued reads are finished, but I might have missed something
there.

What you missed is that the native aio system calls require O_DIRECT.

Thanks, that made it work. It seems without O_DIRECT it's just like aio_* but without the separate thread. But I now get the "benefits" of O_DIRECT for free...

Cheers,
M.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/