On Thu, Aug 03, 2017 at 05:52:45PM +0300, Avi Kivity wrote: > Hello, > Hi Avi, > I have an application that uses AIO+DIO to write data to a file on > XFS. The writes use 128k buffers. Very rarely, I see aligned 4k > blocks within the file that are zeroed. The blocks are not aligned > to 128k boundary, just 4k. The buffers are allocated in anonymous > memory, which is usually using transparent hugepages. The files are > fully allocated, not sparse (checked post-mortem). Did you check that the extents are written? i.e. there aren't sporadic 4k unwritten extents in the file? (xfs_bmap -vvp output) If you turn off transparent huge pages, does the problem go away? What kernel version is this seen on? We've changed the XFS DIO IO path implementation substantially in recent times.... > The writes are concurrent and adjacent. To avoid serialization, we > ftruncate() the file to a larger size, then ftruncate() it back when > we know its final size. So it's not extending the file on the writes, so it shouldn't be triggering EOF block zeroing. The only thing I can think of is either the data contains zeros or there's an occasional unwritten extent in the file. > Does this trigger anything in anyone's mind? Nope - do you have a reproducer you can share? Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html