]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: avoid VM_BUG_ON page_count(page) false positives in __collapse_huge_page_copy
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 26 Sep 2012 01:32:55 +0000 (11:32 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:41:22 +0000 (15:41 +1000)
commit9579aa6da1db0dcf2a7b938f7220e83f784efbd8
tree47cdd5f7c616e5484126131783412317d6dbf092
parentd12a41d0ba66037824bae760b5cc32bc50d07697
thp: avoid VM_BUG_ON page_count(page) false positives in __collapse_huge_page_copy

Some time ago Petr once reproduced a false positive VM_BUG_ON in
khugepaged while running the autonuma-benchmark on a large 8 node system.
All production kernels out there have DEBUG_VM=n so it was only noticeable
on self built kernels.  It's not easily reproducible even on the 8 nodes
system.

Use page_freeze_refs to prevent speculative pagecache lookups to
trigger the false positives, so we're still able to check the
page_count to be exact.

This patch removes the false positive and it has been tested for a
while and it's good idea to queue it for upstream too. It's not urgent
and probably not worth it for -stable, though it wouldn't hurt. On
smaller systems it's not reproducible AFIK.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c