lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200822142414.GY17456@casper.infradead.org>
Date:   Sat, 22 Aug 2020 15:24:14 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     "yukuai (C)" <yukuai3@...wei.com>,
        Gao Xiang <hsiangkao@...hat.com>, darrick.wong@...cle.com,
        david@...morbit.com, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        yi.zhang@...wei.com
Subject: Re: [RFC PATCH V3] iomap: add support to track dirty state of sub
 pages

On Sat, Aug 22, 2020 at 07:03:45AM +0100, Christoph Hellwig wrote:
> On Fri, Aug 21, 2020 at 02:36:57PM +0100, Matthew Wilcox wrote:
> > On Fri, Aug 21, 2020 at 07:12:34AM +0100, Christoph Hellwig wrote:
> > > iomap sets PagePrivate if a iomap_page structure is allocated.  Right
> > > now that means for all pages on a file system with a block size smaller
> > > than the page size, although I hope we reduce that scope a little.
> > 
> > I was thinking about that.  Is there a problem where we initially allocate
> > the page with a contiguous extent larger than the page, then later need
> > to write the page to a pair of extents?
> > 
> > If we're doing an unshare operation, then we know our src and dest iomaps
> > and can allocate the iop then.  But if we readahead, we don't necessarily
> > know our eventual dest.  So the conditions for skipping allocating an
> > iop are tricky to be sure we'll never need it.
> 
> So with the current codebase (that is without your THP work that I need
> to re-review) the decision should be pretty easy:
> 
>  - check if block size >= PAGE, and if yes don't allocate
>  - check if the extent fully covers the page, and if yes don't allocate
> 
> Now with THP we'd just need to check the thp size instead of the page
> above and be fine, or do I miss something?

The case I was worrying about:

fill a filesystem so that free space is very fragmented
readahead into a hole
hole is large, don't allocate an iop
writeback the page
don't have an iop, can't track the write count

I'd be fine with choosing to allocate an iop later (and indeed I do that
as part of the THP work).  But does this scenario make you think of any
other corner cases?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ