lkml.org 
[lkml]   [2004]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 4level page tables for Linux
On Tue, Oct 12, 2004 at 11:48:22AM -0700, Dave Hansen wrote:
> @@ -110,13 +115,18 @@ int install_file_pte(struct mm_struct *m
> unsigned long addr, unsigned long pgoff, pgprot_t prot)
> {
> ...
> + pml4 = pml4_offset(mm, addr);
> +
> + spin_lock(&mm->page_table_lock);
> + pgd = pgd_alloc(mm, pml4, addr);
> + if (!pgd)
> + goto err_unlock;
>
> Locking isn't needed for access to the pml4? This is a wee bit
> different from pgd's and I didn't see any documentation about it

btw, locking isn't needed even for the pgd.

fremap.c is the only one that gets it right:

pgd = pgd_offset(mm, addr);
spin_lock(&mm->page_table_lock);
pmd = pmd_alloc(mm, pgd, addr);

the rest is just overkill but it doesn't hurt in practice.

after you add the 4level, locking will become necessary for the pgd, but
it's still not needed for the pml4.

I'm not very excited about changing the naming, of the pgd/pmd/pte so I
like to keep it like it is now.

peraphs we could consider pgd4 instead of pml4. What does "pml" stands
for?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.048 / U:2.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site