Re: [PATCH] docs: x86: Remove obsolete information about x86_64 vmalloc() faulting

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

 



Hi all,

> diff --git a/Documentation/x86/x86_64/mm.rst b/Documentation/x86/x86_64/mm.rst
> index ede1875719fb..9798676bb0bf 100644
> --- a/Documentation/x86/x86_64/mm.rst
> +++ b/Documentation/x86/x86_64/mm.rst
> @@ -140,10 +140,6 @@ The direct mapping covers all memory in the system up to the highest
>  memory address (this means in some cases it can also include PCI memory
>  holes).
>  
> -vmalloc space is lazily synchronized into the different PML4/PML5 pages of
> -the processes using the page fault handler, with init_top_pgt as
> -reference.

This information is out-of-date, and it took me quite some time of
ftrace'ing before I figured it out...  I think it would be beneficial to
update, or at least remove it.

As a proof that I understand what I am talking about, on my x86_64 box:

  1. I allocated a vmalloc() area containing linear address `addr`;
  2. I manually pagewalked `addr` in different page tables, including
     `init_mm.pgd`;
  3. The corresponding PGD entries for `addr` in different page tables,
     they all immediately pointed at the same PUD table (my box uses
     4-level paging), at the same physical address;
  4. No "lazy synchronization" via page fault handling happened at all,
     since it is the same PUD table pre-allocated by
     preallocate_vmalloc_pages() during boot time.

Commit 6eb82f994026 ("x86/mm: Pre-allocate P4D/PUD pages for vmalloc
area") documented this clearly:

"""
Doing this at boot makes sure no synchronization of that area is
necessary at runtime.
"""

Should we remove this sentence, or update it?  Any ideas?

Sincerely,
Peilin Ye




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux