Skip to content

Commit

Permalink
[PATCH] Drop page table lock before calling migrate_page_add()
Browse files Browse the repository at this point in the history
migrate_page_add cannot be called with a spinlock held (calls
isolate_lru_page which calles schedule_on_each_cpu).  Drop ptl lock in
check_pte_range before calling migrate_page_add().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jan 9, 2006
1 parent 1a75a6c commit 132beac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,11 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd,

if (flags & MPOL_MF_STATS)
gather_stats(page, private);
else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {
spin_unlock(ptl);
migrate_page_add(vma, page, private, flags);
spin_lock(ptl);
}
else
break;
} while (pte++, addr += PAGE_SIZE, addr != end);
Expand Down

0 comments on commit 132beac

Please sign in to comment.