linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Christoph Hellwig <hch@infradead.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Brian Foster <bfoster@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iomap: Ensure iop->uptodate matches PageUptodate
Date: Tue, 28 Jul 2020 10:23:01 +0100	[thread overview]
Message-ID: <20200728092301.GA32142@infradead.org> (raw)
In-Reply-To: <20200726235335.GU2005@dread.disaster.area>

On Mon, Jul 27, 2020 at 09:53:35AM +1000, Dave Chinner wrote:
> Yes, I understand the code accepts it can happen; what I dislike is
> code that asserts subtle behaviour can happen, then doesn't describe
> that exactly why/how that condition can occur. And then, because we
> don't know exactly how something happens, we add work arounds to
> hide issues we can't reason through fully. That's .... suboptimal.
> 
> Christoph might know off the top of his head how we get into this
> state. Once we work it out, then we need to add comments...

Unfortunately I don't know offhand.  I'll need to spend some more
quality time with this code first.

> > Way ahead of you
> > http://git.infradead.org/users/willy/pagecache.git/commitdiff/5a1de6fc4f815797caa4a2f37c208c67afd7c20b
> 
> *nod*
> 
> I would suggest breaking that out as a separate cleanup patch and
> not hide is in a patch that contains both THP modifications and bug
> fixes. It stands alone as a valid cleanup.

I'm pretty sure I already suggested that when it first showed up.

That being said I have another somewhat related thing in this area
that I really want to get done before THP support, and maybe I can
offload it to willy:

Currently we always allocate the iomap_page structure for blocksize
< PAGE_SIZE.  While this was easy to implement and a major improvement
over the buffer heads it actually is quite silly, as we only actually
need it if we either have sub-page uptodate state, or have extents
boundaries in the page.  So what I'd like to do is to only actually
allocate it in that case.  By doing the allocation lazy it should also
help to never allocate one that is marked all uptodate from the start.

  reply	other threads:[~2020-07-28  9:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26  9:10 [PATCH] iomap: Ensure iop->uptodate matches PageUptodate Matthew Wilcox (Oracle)
2020-07-26 15:15 ` Christoph Hellwig
2020-07-26 23:06 ` Dave Chinner
2020-07-26 23:20   ` Matthew Wilcox
2020-07-26 23:53     ` Dave Chinner
2020-07-28  9:23       ` Christoph Hellwig [this message]
2020-07-28 13:15         ` Matthew Wilcox
2020-07-28  9:17 ` [iomap] 2fa482b890: WARNING:at_fs/iomap/buffered-io.c:#iomap_page_release kernel test robot

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=20200728092301.GA32142@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).