lkml.org 
[lkml]   [2019]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/mm: Split vmalloc_sync_all()
From
Date
On 10/7/19 8:16 AM, Joerg Roedel wrote:
> @@ -318,7 +328,7 @@ static void dump_pagetable(unsigned long address)
>
> #else /* CONFIG_X86_64: */
>
> -void vmalloc_sync_all(void)
> +void vmalloc_sync_mappings(void)
> {
> sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END);
> }

FWIW, I generally detest the use of __weak. :)

In this case, it ends up letting us gloss over the fact that we have a
32/64-bit asymmetry. It would probably be nice to actually have a
64-bit implementation that comes along with a nice comment. Maybe this
in vmalloc_sync_mappings():

/*
* 64-bit mappings might allocate new p4d/pud pages
* that need to be propagated to all tasks' PGDs.
*/

which would pair nicely with:

void vmalloc_sync_unmappings(void)
{
/*
* Unmappings never allocate or free p4d/pud pages.
* No work is required here.
*/
}

\
 
 \ /
  Last update: 2019-10-07 17:31    [W:0.055 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site