Re: [PATCH 2/2] mm: pgtable: remove unnecessary split ptlock for kernel PMD page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matthew,

On 2024/2/5 02:54, Matthew Wilcox wrote:
On Thu, Feb 01, 2024 at 04:05:41PM +0800, Qi Zheng wrote:
For kernel PMD entry, we use init_mm.page_table_lock to protect it, so
there is no need to allocate and initialize the split ptlock for kernel
PMD page.

I don't think this is a great idea.  Maybe there's no need to initialise
it, but keeping things the same between kernel & user page tables is a
usually better.  We don't normally allocate memory for the spinlock,
it's only in debugging scenarios like LOCKDEP.  I would drop this unless
you have a really compelling argument to make.

The reason I first noticed this is that we didn't allocate and
initialize the ptlock in __pte_alloc_one_kernel(). So in at the PTE
level, the implementation of kernel & user page tables is already
different.

Thanks.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux