linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	"Darrick J . Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	cluster-devel@redhat.com
Subject: Re: [PATCH 0/2] iomap: small block problems
Date: Tue, 29 Jun 2021 06:42:40 +0100	[thread overview]
Message-ID: <YNqy0E4xFwHDhK32@infradead.org> (raw)
In-Reply-To: <YNqvzNd+7+YtXfQj@infradead.org>

On Tue, Jun 29, 2021 at 06:29:48AM +0100, Christoph Hellwig wrote:
> Hmm.  Actually ->page_mkwrite is always is always called on an uptodate
> page and we even assert that.  I should have remembered the whole page
> fault path better.
> 
> So yeah, I think we should take patch 1 from Andreas, then a non-folio
> version of your patch as a start.  The next steps then would be in
> approximate order:
> 
>  1. remove the iomap_page_create in iomap_page_mkwrite_actor as it
>     clearly is not needed at that point
>  2. don't bother to create an iomap_page in iomap_readpage_actor when
>     the iomap spans the whole page
>  3. don't create the iomap_page in __iomap_write_begin when the
>     page is marked uptodate or the write covers the whole page 

Further thoughts for a better series:

 1. create iomap_page if needed in iomap_writepage_map
 2. do not create the iomap_page at all in iomap_readpage_actor.
    ->readahead is always called on newly allocated pages, and
    ->readpage either on a clean !uptodate page or on one that
    has seen a write leading to a partial uptodate state.  That
    is for the case that cares about the iomap_page it is present
    already
 3. don't create the iomap_page in iomap_page_mkwrite_actor

I think this is the simple initial series that should solve Andreas'
problem.  Then we can look into optimizing __iomap_write_begin
and iomap_writepage_map further as needed.

  reply	other threads:[~2021-06-29  5:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 17:27 [PATCH 0/2] iomap: small block problems Andreas Gruenbacher
2021-06-28 17:27 ` [PATCH 1/2] iomap: Don't create iomap_page objects for inline files Andreas Gruenbacher
2021-06-30 13:35   ` Matthew Wilcox
2021-06-28 17:27 ` [PATCH 2/2] iomap: Add helper for un-inlining an inline inode Andreas Gruenbacher
2021-06-28 17:39 ` [PATCH 0/2] iomap: small block problems Matthew Wilcox
2021-06-28 17:47   ` Christoph Hellwig
2021-06-28 21:28     ` Andreas Gruenbacher
2021-06-28 21:59     ` Matthew Wilcox
2021-06-29  5:29       ` Christoph Hellwig
2021-06-29  5:42         ` Christoph Hellwig [this message]
2021-06-30 12:29         ` Andreas Gruenbacher
2021-07-05 15:51           ` Andreas Gruenbacher
2021-07-05 16:55             ` Christoph Hellwig
2021-06-28 17:55   ` Andreas Gruenbacher
2021-06-29  9:12 ` Andreas Gruenbacher
2021-06-30 14:08   ` Matthew Wilcox
2021-06-30 14:45     ` Andreas Gruenbacher

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=YNqy0E4xFwHDhK32@infradead.org \
    --to=hch@infradead.org \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).