Re: [PATCH RFC] Insure direct IO writes do not use the page cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Curt Wohlgemuth wrote:
> Although replying to self is somewhat bad etiquette...

nah :)

> I've found at least one issue with this patch:  Although the semantics
> seem correct, since the late-converted-to-init extents are not merged
> with neighbors, you can easily end up with thousands of extents :-( .
> Each write to fallocate'd space results in its own initialized extent.
> 
> I'm not sure how expensive it would be to merge the extents when they
> are converted to initialized after the DIO write goes through.
> 
> Curt
> 

hm I think I've seen other cases where things don't get merged as well
as I'd expect.

I haven't replied to the first mail yet because I have a lot of
remembering to do about xfs first, but I'm fairly certain that at least
your use of blockdev_direct_IO_own_locking() is not correct.  See for
example all the comments around __blockdev_direct_IO about i_mutex, and
all the xfs_ilock/xfs_iolock calls in xfs_read/xfs_write.

There is a lot of locking for the fs to handle if you want to go that route.

Also, IIRC xfs does the conversion to written (vs. unwritten) extents in
an IO completion handler, just FWIW.

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux