Re: [PATCH] x86/mm: Split vmalloc_sync_all()

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

 



Hi Dave,

thanks for your review!

On Mon, Oct 07, 2019 at 08:30:51AM -0700, Dave Hansen wrote:
> 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. :)

Yeah, I don't like it either, but in this case it is probably better
than empty stubs in all architectures besides x86 :)

> 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.
> 	 */
> }

Yes, that makes, I will add these comments in V2.

Thanks,

	Joerg



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux