Re: [PATCH v2] fs: Fix page cache inconsistency when mixing buffered and AIO DIO for bdev

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

 



On Wed, May 18, 2022 at 9:47 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Sat, May 07, 2022 at 12:10:33PM +0800, Liang Chen wrote:
> > From: Liang Chen <liangchen.linux@xxxxxxxxx>
> >
> > As pointed out in commit 332391a, mixing buffered reads and asynchronous
> > direct writes risks ending up with a situation where stale data is left
> > in page cache while new data is already written to disk. The same problem
> > hits block dev fs too. A similar approach needs to be taken here.
>
> What is the real issue here?  If you mix direct and buffered I/O
> you generally get what you pay for.  Even more so on block devices that
> don't even follow Posix file system semantics.

Sorry, missed your reply.
You are right. The problem was manifested when mixing direct and
buffered I/O, and can be avoided by not doing so.
I tried to bring block device direct IO onto one of the generic DIO
paths, but it resulted in some noticeable performance degradation.
So I would rather leave it as is, since as you mentioned block devices
don't even follow Posix file system semantics.

Thanks,
Liang



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux