Hugh Dickins c74df32c72 [PATCH] mm: ptd_alloc take ptlock
Second step in pushing down the page_table_lock.  Remove the temporary
bridging hack from __pud_alloc, __pmd_alloc, __pte_alloc: expect callers not
to hold page_table_lock, whether it's on init_mm or a user mm; take
page_table_lock internally to check if a racing task already allocated.

Convert their callers from common code.  But avoid coming back to change them
again later: instead of moving the spin_lock(&mm->page_table_lock) down,
switch over to new macros pte_alloc_map_lock and pte_unmap_unlock, which
encapsulate the mapping+locking and unlocking+unmapping together, and in the
end may use alternatives to the mm page_table_lock itself.

These callers all hold mmap_sem (some exclusively, some not), so at no level
can a page table be whipped away from beneath them; and pte_alloc uses the
"atomic" pmd_present to test whether it needs to allocate.  It appears that on
all arches we can safely descend without page_table_lock.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:40 -07:00
..
2005-10-29 21:40:39 -07:00
2005-10-29 21:40:38 -07:00
2005-10-28 08:16:49 -07:00
2005-10-28 08:16:49 -07:00
2005-04-16 15:20:36 -07:00
2005-06-25 16:24:29 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-10-29 21:40:40 -07:00
2005-09-07 16:57:33 -07:00
2005-07-27 16:25:51 -07:00
2005-10-28 08:16:49 -07:00
2005-10-08 15:00:57 -07:00
2005-09-10 10:06:21 -07:00
2005-04-16 15:20:36 -07:00
2005-09-21 10:11:54 -07:00
2005-07-07 18:23:46 -07:00
2005-09-07 16:57:45 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:17 -07:00
2005-09-10 10:06:21 -07:00
2005-08-01 10:03:56 -07:00
2005-08-29 16:01:32 -07:00
2005-04-16 15:20:36 -07:00
2005-07-12 20:38:38 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:45 -07:00