public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, akpm@digeo.com
Subject: Re: 4level page tables for Linux
Date: Tue, 12 Oct 2004 11:48:22 -0700	[thread overview]
Message-ID: <1097606902.10652.203.camel@localhost> (raw)
In-Reply-To: <20041012135919.GB20992@wotan.suse.de>

@@ -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
anywhere.  Could be confusing.

+++ linux-2.6.9rc4-4level/mm/memory.c 
...
+#undef inline
+#define inline
+unsigned long caddr;

Is this just for debugging?

+static inline void free_one_pml4(struct mmu_gather *tlb, pml4_t *pml4,
+                                unsigned long addr, unsigned long end)
+{
...
+       do {
+               caddr = addr;
+               free_one_pgd(tlb, pgd);
+               free++;
+               addr = (addr + PGDIR_SIZE) & PGDIR_MASK;
+               pgd++;
+       } while (addr && addr < end);

If someone attempts to clear an address which is in the top PGDIR_SIZE
bytes of memory, this will overflow.  Is that an issue?

There also seems to be quite a bit of churn in the copy_*_range()
functions that isn't completely related to the pml4 changes.  Should
that get broken out?

-- Dave


  reply	other threads:[~2004-10-12 18:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12 13:59 4level page tables for Linux Andi Kleen
2004-10-12 18:48 ` Dave Hansen [this message]
2004-10-12 19:03   ` Andi Kleen
2004-10-12 19:08     ` 4level page tables for Linux II Andi Kleen
2004-10-13 18:41   ` 4level page tables for Linux Andrea Arcangeli
2004-10-13 19:35     ` Andi Kleen
2004-10-13 20:04       ` Andrea Arcangeli
2004-10-18 17:02         ` Christoph Lameter
2004-10-18 17:21           ` Andi Kleen
2004-10-18 17:38           ` Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2004-10-13 23:22 Albert Cahalan
2004-10-13 23:51 ` Andrea Arcangeli
2004-10-14  1:15   ` Albert Cahalan
2004-10-14  9:25 linux
2004-10-14 11:15 ` Robin Holt
2004-10-17  2:57 ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097606902.10652.203.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox