Re: [PATCH 56 of 67] Memory compaction core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 09, 2010 at 11:51:27AM +0100, Mel Gorman wrote:
> 4 irq-safe locked ops. I don't know off-hand what the cycle cost of disabling
> and enabling IRQs is but I'd expect it to be longer than what it takes to
> scan over a few pages.

Agreed.

BTW, after the #19 release the rmap_mapcount != page_mapcount error
that triggered also without memory compaction never happened again, so
that error was most certainly caused by the anon-vma changes, that I
backed out in #19 (as the fixes didn't work yet for me).

The bug in remove_migration_pte happened again once but this time I
tracked it down and fixed. rmap_walk will have lookup in parent or
child vmas that may have been cowed and collapsed by khugepaged.

You can find this already in 8707120d97e7052ffb45f9879efce8e7bd361711
in aa.git (soon I'll post a -20 release, I wanted to add numa
awareness to alloc_hugepage first). I've been running with
8707120d97e7052ffb45f9879efce8e7bd361711 with heavy load on multiple
systems with memory compaction enabled in direct reclaim of hugepage
faults, and there's zero problem. So we're fully stable now (again).

diff --git a/mm/migrate.c b/mm/migrate.c
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -100,6 +100,13 @@ static int remove_migration_pte(struct p
 		goto out;
 
 	pmd = pmd_offset(pud, addr);
+	if (pmd_trans_huge(*pmd)) {
+		/* verify this pmd isn't mapping our old page */
+		BUG_ON(!pmd_present(*pmd));
+		BUG_ON(PageTransCompound(old));
+		BUG_ON(pmd_page(*pmd) == old);
+		goto out;
+	}
 	if (!pmd_present(*pmd))
 		goto out;
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]