Thread (21 messages) 21 messages, 6 authors, 2021-03-09

Re: [PATCH v4 1/3] x86/vmemmap: Drop handling of 4K unaligned vmemmap range

From: Dave Hansen <hidden>
Date: 2021-03-05 17:39:00
Also in: lkml

On 3/1/21 12:32 AM, Oscar Salvador wrote:
remove_pte_table() is prepared to handle the case where either the
start or the end of the range is not PAGE aligned.
This cannot actually happen:

__populate_section_memmap enforces the range to be PMD aligned,
so as long as the size of the struct page remains multiple of 8,
the vmemmap range will be aligned to PAGE_SIZE.

Drop the dead code and place a VM_BUG_ON in vmemmap_{populate,free}
to catch nasty cases.
I was wondering why the VM_BUG_ON()s went in vmemmap_free() instead of
closer to the code that you modified in remove_pte_table().  I assume
this was because vmemmap_free() is the only (indirect) caller of
remove_pte_table().

Otherwise, this looks fine to me:

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help