public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	"yukuai (C)" <yukuai3@huawei.com>,
	Gao Xiang <hsiangkao@redhat.com>,
	darrick.wong@oracle.com, david@fromorbit.com,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawei.com
Subject: Re: [RFC PATCH V3] iomap: add support to track dirty state of sub pages
Date: Sat, 22 Aug 2020 07:03:45 +0100	[thread overview]
Message-ID: <20200822060345.GD17129@infradead.org> (raw)
In-Reply-To: <20200821133657.GU17456@casper.infradead.org>

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?

  reply	other threads:[~2020-08-22  6:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 12:05 [RFC PATCH V3] iomap: add support to track dirty state of sub pages Yu Kuai
2020-08-19 12:56 ` Gao Xiang
2020-08-20  1:38   ` yukuai (C)
2020-08-21  6:12     ` Christoph Hellwig
2020-08-21 13:36       ` Matthew Wilcox
2020-08-22  6:03         ` Christoph Hellwig [this message]
2020-08-22 14:24           ` Matthew Wilcox
2020-08-22 16:43             ` Christoph Hellwig
2020-08-21  6:17 ` 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=20200822060345.GD17129@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hsiangkao@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=willy@infradead.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox