Re: [PATCH v5 6/8] mm: Introduce deferred freeing for kernel page tables
From: Baolu Lu
Date: Sat Oct 11 2025 - 02:34:40 EST
On 10/10/25 23:47, David Hildenbrand wrote:
On 19.09.25 07:40, Lu Baolu wrote:
From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
This introduces a conditional asynchronous mechanism, enabled by
CONFIG_ASYNC_PGTABLE_FREE. When enabled, this mechanism defers the
freeing
of pages that are used as page tables for kernel address mappings. These
pages are now queued to a work struct instead of being freed immediately.
Okay, I now looked at patch #8 and I think the whole reason of this
patch is "batch-free page tables to minimize the impact of an expensive
cross-page table operation" which is a single TLB flush.
This deferred freeing provides a safe context for a future patch to add
So I would claridy here instead something like
"This deferred freeing allows for batch-freeing of page tables,
providing a safe context for performing a single expensive operation
(TLB flush) for a batch of kernel page tables instead of performing that
expensive operation for each page table."
The commit message has been updated, and CONFIG_ASYNC_PGTABLE_FREE has
been replaced with CONFIG_ASYNC_KERNEL_PGTABLE_FREE. Thank you for the
comments.
Thanks,
baolu