[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b848c431-deca-42e4-925c-673b3fa1f251@redhat.com>
Date: Mon, 22 Apr 2024 13:24:40 +0200
From: David Hildenbrand <david@...hat.com>
To: Yajun Deng <yajun.deng@...ux.dev>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/rmap: remove unnecessary page_table_lock
On 22.04.24 12:52, Yajun Deng wrote:
> page_table_lock is a lock that for page table, we won't change page
> table in __anon_vma_prepare(). As we can see, it works well in
> anon_vma_clone(). They do the same operation.
We are reusing mm->page_table_lock to serialize, not the *actual*
low-level page table locks that really protect PTEs.
With that locking gone, there would be nothing protection vma->anon_vma.
Note that anon_vma_clone() is likely called with the mmap_lock held in
write mode, which is not the case for __anon_vma_prepare() ...
I think this change is wrong.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists