confuse about generic_file_read_iter

Jimmy Li coder.liss at gmail.com
Sun May 4 23:39:56 EDT 2014


Hello everyone,

I'm trying to figure out how asyncchronous I/O implemented, but I'm
confusing about the generic_file_read_iter in mm/filemap.c.
major file systems use this function as read_iter for it's
file_operations structure(eg, ext3).

And it's called by syscall io_submit(fs/aio.c:1359):
   sys_io_submit -> do_io_submit -> io_submit_one -> aio_run_iocb

The point I'm confusing is generic_file_read_iter seems do noting about
asyncchronous I/O at all, as I see what generic_file_read_iter does:
   if opened with O_DIRECT
     flush pages;
	 call direct_IO;
   else
     call do_generic_file_read();
Actually, I think it's syncchronous.

It's that means file systems using generic_file_read_iter does not
support aio(such as ext3)?

I also tried `git log fs/aio.c`. I found retry-based AIO is removed at
commit 41003a7bcfed1255032e1e7c7b487e505b22e298(Tue May 7 16:18:25 2013)
Could anyone tell me how does linux AIO implement now?

I'm working on linux-next(20140502)
thanks.



More information about the Kernelnewbies mailing list