The question about parallel direct IO in xfs
Zheng Liu
gnehzuil.liu at gmail.com
Thu Jan 19 21:55:08 CST 2012
Hi all,
Recently we encounter an issue in ext4. The issue is that, when we do a direct
IO, ext4 will acquire inode->i_mutex in generic_file_aio_write(). It declines
the performance. Here is the detailed conversation.
http://www.spinics.net/lists/linux-ext4/msg30058.html
I know that in xfs it uses i_iolock, which is a rw_semaphore, to make parallel
operations in direct IO. But I have a question. As we do some read/write
operations in direct IO, it seems that there has a window to cause data
inconsistency. For example, One thread does a write operation to overlay some
data at a offset. Meanwhile another thread does a read operation at the same
offset. We assume that write is earlier than read. Hence, we should read new
data. Although it is diffculty to occur, it is possible that read is issued to
the disk firstly and we read old data. I don't know whether it exists or not in
xfs. Thank you.
Sorry, I don't subscribe this mailing list. Please CC to me
<gnehzuil.liu at gmail.com>. Thank you.
Regards,
Zheng
More information about the xfs
mailing list