[Top] [All Lists]

The question about parallel direct IO in xfs

To: xfs@xxxxxxxxxxx
Subject: The question about parallel direct IO in xfs
From: Zheng Liu <gnehzuil.liu@xxxxxxxxx>
Date: Fri, 20 Jan 2012 11:55:08 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=0Q0aKR1TtCvGaegrWXHel5wcJaVO3nrgg6D8oIneHAs=; b=qQw57KH5TQWH7774EoQPM1PF6ceAxEe80BGIrPPK5Swa6PMZjANEUcozCp2GHHHQeu IiQpDl6P+P5I7xf0lqm2DZBLG1VrCh3SbJZJ6zmFeZ1wGqSq/UzkjxTzEh3NRUX8RJ5z H7vtS+SVgiA+F1c3q7c3CDmd+DLj6WpFCFzjc=
User-agent: Mutt/1.5.21 (2010-09-15)
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.

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@xxxxxxxxx>. Thank you.


<Prev in Thread] Current Thread [Next in Thread>