Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'numa-migration-fixes' (fixes from Mel Gorman)

Merge NUMA balancing related fixlets from Mel Gorman:
"There were a few minor changes so am resending just the two patches
that are mostly likely to affect the bug Dave and Sasha saw and marked
them for stable.

I'm less confident it will address Sasha's problem because while I
have not kept up to date, I believe he's also seeing memory corruption
issues in next from an unknown source. Still, it would be nice to see
how they affect trinity testing.

I'll send the MPOL_MF_LAZY patch separately because it's not urgent"

* emailed patches from Mel Gorman <mgorman@suse.de>:
mm: numa: Do not mark PTEs pte_numa when splitting huge pages
mm: migrate: Close race between migration completion and mprotect

+9 -3
+5 -2
mm/huge_memory.c
··· 1795 1795 for (i = 0; i < HPAGE_PMD_NR; i++, haddr += PAGE_SIZE) { 1796 1796 pte_t *pte, entry; 1797 1797 BUG_ON(PageCompound(page+i)); 1798 + /* 1799 + * Note that pmd_numa is not transferred deliberately 1800 + * to avoid any possibility that pte_numa leaks to 1801 + * a PROT_NONE VMA by accident. 1802 + */ 1798 1803 entry = mk_pte(page + i, vma->vm_page_prot); 1799 1804 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 1800 1805 if (!pmd_write(*pmd)) 1801 1806 entry = pte_wrprotect(entry); 1802 1807 if (!pmd_young(*pmd)) 1803 1808 entry = pte_mkold(entry); 1804 - if (pmd_numa(*pmd)) 1805 - entry = pte_mknuma(entry); 1806 1809 pte = pte_offset_map(&_pmd, haddr); 1807 1810 BUG_ON(!pte_none(*pte)); 1808 1811 set_pte_at(mm, haddr, pte, entry);
+4 -1
mm/migrate.c
··· 146 146 pte = pte_mkold(mk_pte(new, vma->vm_page_prot)); 147 147 if (pte_swp_soft_dirty(*ptep)) 148 148 pte = pte_mksoft_dirty(pte); 149 + 150 + /* Recheck VMA as permissions can change since migration started */ 149 151 if (is_write_migration_entry(entry)) 150 - pte = pte_mkwrite(pte); 152 + pte = maybe_mkwrite(pte, vma); 153 + 151 154 #ifdef CONFIG_HUGETLB_PAGE 152 155 if (PageHuge(new)) { 153 156 pte = pte_mkhuge(pte);