|| ||Hugh Dickins <hughd-AT-google.com> |
|| ||Martin Schwidefsky <schwidefsky-AT-de.ibm.com> |
|| ||Re: [PATCH] mm: Fix XFS oops due to dirty pages without buffers on
|| ||Wed, 10 Oct 2012 14:57:48 -0700 (PDT)|
|| ||Jan Kara <jack-AT-suse.cz>, linux-mm-AT-kvack.org,
LKML <linux-kernel-AT-vger.kernel.org>, xfs-AT-oss.sgi.com,
Mel Gorman <mgorman-AT-suse.de>, linux-s390-AT-vger.kernel.org|
|| ||Article, Thread
On Tue, 9 Oct 2012, Hugh Dickins wrote:
> On Tue, 9 Oct 2012, Martin Schwidefsky wrote:
> > On Mon, 8 Oct 2012 21:24:40 -0700 (PDT)
> > Hugh Dickins <firstname.lastname@example.org> wrote:
> > > A separate worry came to mind as I thought about your patch: where
> > > in page migration is s390's dirty storage key migrated from old page
> > > to new? And if there is a problem there, that too should be fixed
> > > by what I propose in the previous paragraph.
> > That is covered by the SetPageUptodate() in migrate_page_copy().
> I don't think so: that makes sure that the newpage is not marked
> dirty in storage key just because of the copy_highpage to it; but
> I see nothing to mark the newpage dirty in storage key when the
> old page was dirty there.
I went to prepare a patch to fix this, and ended up finding no such
problem to fix - which fits with how no such problem has been reported.
Most of it is handled by page migration's unmap_and_move() having to
unmap the old page first: so the old page will pass through the final
page_remove_rmap(), which will transfer storage key to page_dirty in
those cases which it deals with (with the old code, any file or swap
page; with the new code, any unaccounted file or swap page, now that
we realize the accounted files don't even need this); and page_dirty
is already properly migrated to the new page.
But that does leave one case behind: an anonymous page not yet in
swapcache, migrated via a swap-like migration entry. But this case
is not a problem because PageDirty doesn't actually affect anything
for an anonymous page not in swapcache. There are various places
where we set it, and its life-history is hard to make sense of, but
in fact it's meaningless in 2.6, where page reclaim adds anon to swap
(and sets PageDirty) whether the page was marked dirty before or not
(which makes sense when we use the ZERO_PAGE for anon read faults).
2.4 did behave differently: it was liable to free anon pages not
marked dirty, and I think most of our anon SetPageDirtys are just a
relic of those days - I do have a patch from 18 months ago to remove
them (adding PG_dirty to the flags which should not be set when a
page is freed), but there are usually more urgent things to attend
to than rebase and retest that.
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to email@example.com. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"firstname.lastname@example.org"> email@example.com </a>
to post comments)