From: Andrea Arcangeli <andrea@suse.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: mapped pages being truncated [was Re: 2.6.5-rc2-aa5]
Date: Tue, 30 Mar 2004 21:01:02 +0200 [thread overview]
Message-ID: <20040330190102.GD3808@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.44.0403301930040.23534-100000@localhost.localdomain>
On Tue, Mar 30, 2004 at 07:48:42PM +0100, Hugh Dickins wrote:
> On Tue, 30 Mar 2004, Andrea Arcangeli wrote:
> >
> > note that the very same bug triggers with objrmap only applied (before I
> > applied anon-vma and prio-tree on top of it), so at very least this is a
> > bug in Dave's code too. See the same BUG_ON triggering in rmap.c before
> > I replace it with objrmap.c in anon-vma. Almost certainly it will trigger with
> > your patches applied too and probably it happens with mainline 2.6 too
> > but nobody tested that yet.
>
> Do you have enough evidence that it's the very same bug?
yes, see the two stack traces, they trigger in the same place and it's
the very same workload. Andrew just noticed that xfs indeed calls
truncate_inode_pages before vmtruncate. It will trigger with your
patches too.
> I believe there were other loopholes in the original objrmap code,
> we've both moved on from there (e.g. we both decided it's safer to
> set and clear PageAnon inside the maplock), so I'm not concerned
> about the original objrmap.
Ok I see what you mean, this should fix it, agreed?
--- x/mm/memory.c.~1~ 2004-03-29 19:24:39.000000000 +0200
+++ x/mm/memory.c 2004-03-30 20:57:35.889344056 +0200
@@ -1448,6 +1448,7 @@ retry:
lru_cache_add_active(page);
new_page = page;
anon = 1;
+ pageable = 1;
}
spin_lock(&mm->page_table_lock);
In practice doing a cow on a dma region is pretty useless, so I doubt
anybody would run into it but I agree the above is making the anon page
swappable and it's more correct.
next prev parent reply other threads:[~2004-03-30 19:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 15:06 2.6.5-rc2-aa5 Andrea Arcangeli
2004-03-29 20:48 ` 2.6.5-rc2-aa5 Andrew Morton
2004-03-29 22:45 ` 2.6.5-rc2-aa5 Andrea Arcangeli
2004-03-30 16:10 ` mapped pages being truncated [was Re: 2.6.5-rc2-aa5] Andrea Arcangeli
2004-03-30 18:01 ` Hugh Dickins
2004-03-30 18:20 ` Andrea Arcangeli
2004-03-30 18:48 ` Hugh Dickins
2004-03-30 19:01 ` Andrea Arcangeli [this message]
2004-03-30 19:06 ` Hugh Dickins
2004-03-30 19:12 ` Andrea Arcangeli
2004-03-30 18:28 ` Andrew Morton
2004-03-30 18:51 ` Andrea Arcangeli
2004-03-30 20:13 ` Nathan Scott
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=20040330190102.GD3808@dualathlon.random \
--to=andrea@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.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