public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Review: fix mapping invalidation callouts
Date: Mon, 8 Jan 2007 09:09:16 +0000	[thread overview]
Message-ID: <20070108090916.GA17121@infradead.org> (raw)
In-Reply-To: <20070108040309.GX33919298@melbourne.sgi.com>

On Mon, Jan 08, 2007 at 03:03:09PM +1100, David Chinner wrote:
> With the recent cancel_dirty_page() changes, a warning was
> added if we cancel a dirty page that is still mapped into
> the page tables.
> This happens in XFS from fs_tosspages() and fs_flushinval_pages()
> because they call truncate_inode_pages().
> 
> truncate_inode_pages() does not invalidate existing page mappings;
> it is expected taht this is called only when truncating the file
> or destroying the inode and on both these cases there can be
> no mapped ptes. However, we call this when doing direct I/O writes
> to remove pages from the page cache. As a result, we can rip
> a page from the page cache that still has mappings attached.
> 
> The correct fix is to use invalidate_inode_pages2_range() instead
> of truncate_inode_pages(). They essentially do the same thing, but
> the former also removes any pte mappings before removing the page
> from the page cache.
> 
> Comments?

Generally looks good.  But I feel a little cautios about changes in this
area, so we should throw all possible test loads at this before commiting
it.

  reply	other threads:[~2007-01-08  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08  4:03 Review: fix mapping invalidation callouts David Chinner
2007-01-08  9:09 ` Christoph Hellwig [this message]
2007-01-08 23:04   ` David Chinner
2007-01-09 11:57     ` Lachlan McIlroy
2007-01-10  0:10       ` David Chinner
2007-01-10  6:23 ` David Chinner
2007-01-10  8:39   ` Lachlan McIlroy
2007-01-11  6:49     ` David Chinner
2007-01-11  8:00       ` David Chinner
2007-01-11  8:01       ` David Chatterton

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=20070108090916.GA17121@infradead.org \
    --to=hch@infradead.org \
    --cc=dgc@sgi.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.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