Thread (42 messages) 42 messages, 6 authors, 2023-06-08

Re: [PATCH 08/12] mm/pgtable: add pte_free_defer() for pgtable as page

From: Jann Horn <jannh@google.com>
Date: 2023-06-01 13:32:52
Also in: linux-arm-kernel, linux-s390, lkml, sparclinux

On Mon, May 29, 2023 at 8:23 AM Hugh Dickins [off-list ref] wrote:
Add the generic pte_free_defer(), to call pte_free() via call_rcu().
pte_free_defer() will be called inside khugepaged's retract_page_tables()
loop, where allocating extra memory cannot be relied upon.  This version
suits all those architectures which use an unfragmented page for one page
table (none of whose pte_free()s use the mm arg which was passed to it).
Pages that have been scheduled for deferred freeing can still be
locked, right? So struct page's members "ptl" and "rcu_head" can now
be in use at the same time? If that's intended, it would probably be a
good idea to add comments in the "/* Page table pages */" part of
struct page to point out that the first two members can be used by the
rcu_head while the page is still used as a page table in some
contexts, including use of the ptl.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help