Re: [PATCH] Remove page_table_lock from vma manipulations

From: William Lee Irwin III (
Date: Wed Jun 04 2003 - 17:37:59 EST

On Wed, Jun 04, 2003 at 05:30:25PM -0500, Dave McCracken wrote:
> After more careful consideration, I don't see any reasons why
> page_table_lock is necessary for dealing with vmas. I found one spot in
> swapoff, but it was easily changed to mmap_sem. I've beat on this code and
> mjb has beat on this code with no problems. Here's the patch to remove it.
> Feel free to poke holes in it.

shrink_list() calls try_to_unmap() under pte_chain_lock(page), and
hence try_to_unmap() cannot sleep. Furthermore try_to_unmap() calls
find_vma() under the sole protection of
spin_trylock(&mm->page_table_lock), which I don't see changed to a
read_trylock(&mm->mmap_sem) here.

Hence, this is racy.

-- wli
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:25 EST