On 10/07/2013 06:28 AM, Mel Gorman wrote: > THP migration uses the page lock to guard against parallel allocations > but there are cases like this still open > > Task A Task B > do_huge_pmd_numa_page do_huge_pmd_numa_page > lock_page > mpol_misplaced == -1 > unlock_page > goto clear_pmdnuma > lock_page > mpol_misplaced == 2 > migrate_misplaced_transhuge > pmd = pmd_mknonnuma > set_pmd_at > > During hours of testing, one crashed with weird errors and while I have > no direct evidence, I suspect something like the race above happened. > This patch extends the page lock to being held until the pmd_numa is > cleared to prevent migration starting in parallel while the pmd_numa is > being cleared. It also flushes the old pmd entry and orders pagetable > insertion before rmap insertion. > > Cc: stable <sta...@vger.kernel.org> > Signed-off-by: Mel Gorman <mgor...@suse.de>
Reviewed-by: Rik van Riel <r...@redhat.com> -- All rights reversed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/