From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/6] xfs: avoid COW fork extent lookups in writeback if the fork didn't change
Date: Wed, 11 Jul 2018 19:35:16 +0200 [thread overview]
Message-ID: <20180711173516.GA3961@lst.de> (raw)
In-Reply-To: <20180711173152.GF32415@magnolia>
On Wed, Jul 11, 2018 at 10:31:52AM -0700, Darrick J. Wong wrote:
> On Wed, Jul 11, 2018 at 07:20:32PM +0200, Christoph Hellwig wrote:
> > On Wed, Jul 11, 2018 at 10:15:51AM -0700, Darrick J. Wong wrote:
> > > Hmm, this troubles me slightly -- a short time ago you removed the "trim
> > > this data fork mapping to the first overlap with a cow fork mapping"
> > > (i.e. xfs_reflink_trim_irec_to_next_cow) behavior on the grounds that
> > > _writepage_map calls _map_blocks for every block in the page and so it
> > > was unnecessary. But this seems to put that back. Why is that?
> >
> > Because back then map_blocks did a lookup in the COW fork everytime
> > (unless we are already on a COW mapping), and this patch wants to
> > only look it up when the COW fork actually changed, so the trim is
> > required now.
>
> Ah, ok. Mind if I change the comment to:
>
> /*
> * Truncate to the next COW extent if there is one. This is the only
> * opportunity to do this because we can skip COW fork lookups for the
> * subsequent blocks in the mapping; however, the requirement to treat
> * the COW range separately remains.
> */
>
> I also wonder why we don't need to do the same for holes, but I think
> the answer is that any dirty page with a cow fork mapping must also have
> a data fork mapping (even if it's merely a delalloc reservation) and so
> a hole will never overlap with a cow fork mapping.
I'll update the comment. I'll need to resend against the 4.19-merge
tree anyway, and I also found a little buglet in this patch (it updates
wpc->cow_seq for all allocations and not just COW ones, with that fixed
we should do even less lookups)
next prev parent reply other threads:[~2018-07-11 17:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 6:05 reduce lookups in the COW extent tree Christoph Hellwig
2018-07-10 6:05 ` [PATCH 1/6] xfs: remove if_real_bytes Christoph Hellwig
2018-07-11 16:22 ` Darrick J. Wong
2018-07-10 6:05 ` [PATCH 2/6] xfs: simplify xfs_idata_realloc Christoph Hellwig
2018-07-11 16:23 ` Darrick J. Wong
2018-07-10 6:05 ` [PATCH 3/6] xfs: remove the xfs_ifork_t typedef Christoph Hellwig
2018-07-11 16:23 ` Darrick J. Wong
2018-07-10 6:05 ` [PATCH 4/6] xfs: introduce a new xfs_inode_has_cow_data helper Christoph Hellwig
2018-07-11 16:24 ` Darrick J. Wong
2018-07-10 6:05 ` [PATCH 5/6] xfs: maintain a sequence count for inode fork manipulations Christoph Hellwig
2018-07-10 6:05 ` [PATCH 6/6] xfs: avoid COW fork extent lookups in writeback if the fork didn't change Christoph Hellwig
2018-07-11 17:15 ` Darrick J. Wong
2018-07-11 17:20 ` Christoph Hellwig
2018-07-11 17:31 ` Darrick J. Wong
2018-07-11 17:35 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-12 13:49 reduce lookups in the COW extent tree V2 Christoph Hellwig
2018-07-12 13:49 ` [PATCH 6/6] xfs: avoid COW fork extent lookups in writeback if the fork didn't change Christoph Hellwig
2018-07-13 22:51 ` Darrick J. Wong
2018-07-14 0:03 ` Dave Chinner
2018-07-17 13:37 ` Christoph Hellwig
2018-07-17 23:13 ` Dave Chinner
2018-07-17 23:23 reduce lookups in the COW extent tree V3 Christoph Hellwig
2018-07-17 23:24 ` [PATCH 6/6] xfs: avoid COW fork extent lookups in writeback if the fork didn't change Christoph Hellwig
2018-07-18 14:51 ` Carlos Maiolino
2018-07-21 23:23 ` Dave Chinner
2018-07-23 7:49 ` Christoph Hellwig
2018-07-24 22:35 ` Darrick J. Wong
2018-07-27 15:10 ` Christoph Hellwig
2018-08-06 2:37 ` Dave Chinner
2018-08-06 16:45 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180711173516.GA3961@lst.de \
--to=hch@lst.de \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.