Re: Terrible performance of sequential O_DIRECT 4k writes in SANenvironment. ~3 times slower then Solars 10 with the same HBA/Storage.

From: Christoph Hellwig
Date: Wed Jan 08 2014 - 09:03:53 EST


On Wed, Jan 08, 2014 at 02:17:13AM +0100, Jan Kara wrote:
> Well, I was specifically worried about i_mutex locking. In particular:
> Before we report appending IO completion we need to update i_size.
> To update i_size we need to grab i_mutex.
>
> Now this is unpleasant because inode_dio_wait() happens under i_mutex so
> the above would create lock inversion. And we cannot really do
> inode_dio_done() before grabbing i_mutex as that would open interesting
> races between truncate decreasing i_size and DIO increasing it.

Yeah, XFS splits this between the ilock and iolock, which just makes
life in this area a whole lot easier.

--
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/