Re: 2.6.22 -mm merge plans: mm-more-rmap-checking

From: Hugh Dickins
Date: Tue May 01 2007 - 10:31:47 EST


On Mon, 30 Apr 2007, Andrew Morton wrote:
>...
> mm-more-rmap-checking.patch
>...
>
> Misc MM things. Will merge.

Would Nick mind very much if I ask you to drop this one?
You did CC me ages ago, but I've only just run across it.
It's a small matter, but I'd prefer it dropped for now.

>> Re-introduce rmap verification patches that Hugh removed when he removed
>> PG_map_lock. PG_map_lock actually isn't needed to synchronise access to
>> anonymous pages, because PG_locked and PTL together already do.
>>
>> These checks were important in discovering and fixing a rare rmap corruption
>> in SLES9.

It introduces some silly checks which were never in mainline,
nor so far as I can tell in SLES9: I'm thinking of those
+ BUG_ON(address < vma->vm_start || address >= vma->vm_end);
There are few callsites for these rmap functions, I don't think
they need to be checking their arguments in that way.

It also changes the inline page_dup_rmap (a single atomic increment)
into a bugchecking out-of-line function: do we really want to slow
down fork in that way, for 2.6.22 to fix a rare corruption in SLES9?

What I really like about the patch is Nick's observation that my
/* else checking page index and mapping is racy */
is no longer true: a change we made to the do_swap_page sequence
some while ago has indeed cured that raciness, and I'm happy to
reintroduce the check on mapping and index in page_add_anon_rmap,
and his BUG_ON(!PageLocked(page)) there (despite BUG_ONs falling
out of fashion very recently).

That becomes more important when I send the patches to free up
PG_swapcache, using a PAGE_MAPPING_SWAP bit instead: so I was
planning to include that part of Nick's patch in that series.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/