From: Robin Holt <holt@sgi.com>
To: Dave McCracken <dmccr@us.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Memory Management <linux-mm@kvack.org>
Subject: Re: [PATCH/RFC] Shared page tables
Date: Tue, 17 Jan 2006 17:53:02 -0600 [thread overview]
Message-ID: <20060117235302.GA22451@lnx-holt.americas.sgi.com> (raw)
In-Reply-To: <A6D73CCDC544257F3D97F143@[10.1.1.4]>
Dave,
This appears to work on ia64 with the attached patch. Could you
send me any test application you think would be helpful for me
to verify it is operating correctly? I could not get the PTSHARE_PUD
to compile. I put _NO_ effort into it. I found the following line
was invalid and quit trying.
> + spged = pgd_val(0);
Thanks,
Robin Holt
Index: linux-2.6/arch/ia64/Kconfig
===================================================================
--- linux-2.6.orig/arch/ia64/Kconfig 2006-01-14 07:16:46.149226872 -0600
+++ linux-2.6/arch/ia64/Kconfig 2006-01-14 07:25:02.228853432 -0600
@@ -289,6 +289,38 @@ source "mm/Kconfig"
config ARCH_SELECT_MEMORY_MODEL
def_bool y
+config PTSHARE
+ bool "Share page tables"
+ default y
+ help
+ Turn on sharing of page tables between processes for large shared
+ memory regions.
+
+menu "Page table levels to share"
+ depends on PTSHARE
+
+config PTSHARE_PTE
+ bool "Bottom level table (PTE)"
+ depends on PTSHARE
+ default y
+
+config PTSHARE_PMD
+ bool "Middle level table (PMD)"
+ depends on PTSHARE
+ default y
+
+config PTSHARE_PUD
+ bool "Upper level table (PUD)"
+ depends on PTSHARE && PGTABLE_4
+ default n
+
+endmenu
+
+config PTSHARE_HUGEPAGE
+ bool
+ depends on PTSHARE && PTSHARE_PMD
+ default y
+
config ARCH_DISCONTIGMEM_ENABLE
def_bool y
help
Index: linux-2.6/include/asm-ia64/pgtable.h
===================================================================
--- linux-2.6.orig/include/asm-ia64/pgtable.h 2006-01-14 09:49:47.628417563 -0600
+++ linux-2.6/include/asm-ia64/pgtable.h 2006-01-14 09:51:25.315194368 -0600
@@ -283,14 +283,16 @@ ia64_phys_addr_valid (unsigned long addr
#define pud_bad(pud) (!ia64_phys_addr_valid(pud_val(pud)))
#define pud_present(pud) (pud_val(pud) != 0UL)
#define pud_clear(pudp) (pud_val(*(pudp)) = 0UL)
-#define pud_page(pud) ((unsigned long) __va(pud_val(pud) & _PFN_MASK))
+#define pud_page_kernel(pud) ((unsigned long) __va(pud_val(pud) & _PFN_MASK))
+#define pud_page(pud) virt_to_page((pud_val(pud) + PAGE_OFFSET))
#ifdef CONFIG_PGTABLE_4
#define pgd_none(pgd) (!pgd_val(pgd))
#define pgd_bad(pgd) (!ia64_phys_addr_valid(pgd_val(pgd)))
#define pgd_present(pgd) (pgd_val(pgd) != 0UL)
#define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL)
-#define pgd_page(pgd) ((unsigned long) __va(pgd_val(pgd) & _PFN_MASK))
+#define pgd_page_kernel(pgd) ((unsigned long) __va(pgd_val(pgd) & _PFN_MASK))
+#define pgd_page(pgd) virt_to_page((pgd_val(pgd) + PAGE_OFFSET))
#endif
/*
@@ -363,12 +365,12 @@ pgd_offset (struct mm_struct *mm, unsign
#ifdef CONFIG_PGTABLE_4
/* Find an entry in the second-level page table.. */
#define pud_offset(dir,addr) \
- ((pud_t *) pgd_page(*(dir)) + (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)))
+ ((pud_t *) pgd_page_kernel(*(dir)) + (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)))
#endif
/* Find an entry in the third-level page table.. */
#define pmd_offset(dir,addr) \
- ((pmd_t *) pud_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
+ ((pmd_t *) pud_page_kernel(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
/*
* Find an entry in the third-level page table. This looks more complicated than it
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-01-17 23:53 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-05 16:19 Dave McCracken
2006-01-07 12:25 ` Heiko Carstens
2006-01-07 18:09 ` Dave McCracken
2006-01-08 12:09 ` Heiko Carstens
2006-01-08 14:04 ` Dave McCracken
2006-01-13 5:15 ` Brian Twichell
2006-01-13 22:34 ` Ray Bryant
2006-01-17 4:50 ` Brian Twichell
2006-01-25 4:14 ` Brian Twichell
2006-01-13 15:18 ` Phillip Susi
2006-01-14 20:45 ` Brian Twichell
2006-01-17 23:53 ` Robin Holt [this message]
2006-01-18 0:17 ` Dave Hansen
2006-01-18 6:11 ` Dave McCracken
2006-01-18 1:27 ` Chen, Kenneth W
2006-01-18 3:32 ` Robin Holt
2006-01-23 23:58 ` Ray Bryant
2006-01-24 0:16 ` Ray Bryant
2006-01-24 0:39 ` Andi Kleen
2006-01-24 0:51 ` Dave McCracken
2006-01-24 1:11 ` Andi Kleen
2006-01-24 1:26 ` Dave McCracken
2006-01-24 0:53 ` Ray Bryant
2006-01-24 1:00 ` Dave McCracken
2006-01-24 1:10 ` Andi Kleen
2006-01-24 1:23 ` Benjamin LaHaise
2006-01-24 1:38 ` Andi Kleen
2006-01-24 7:08 ` Arjan van de Ven
2006-01-24 7:06 ` Arjan van de Ven
2006-01-24 7:18 ` Andi Kleen
2006-01-27 18:16 ` Martin Bligh
2006-02-01 9:49 ` Nick Piggin
2006-01-24 14:48 ` Dave McCracken
2006-01-24 14:56 ` Arjan van de Ven
2006-01-24 0:19 ` Dave McCracken
2006-01-24 0:46 ` Ray Bryant
2006-01-24 23:43 ` Ray Bryant
2006-01-24 23:50 ` Dave McCracken
2006-01-25 0:21 ` Ray Bryant
2006-01-25 22:48 ` Ray Bryant
2006-01-25 22:52 ` Dave McCracken
2006-01-26 0:16 ` Ray Bryant
2006-01-26 0:58 ` Ray Bryant
2006-01-26 4:06 ` Robin Holt
2006-01-20 21:24 ` Hugh Dickins
2006-01-20 21:54 ` Chen, Kenneth W
2006-01-23 17:39 ` Dave McCracken
2006-01-23 20:19 ` Benjamin LaHaise
2006-01-24 17:50 ` Hugh Dickins
2006-01-24 18:07 ` Dave McCracken
2006-01-24 18:20 ` Hugh Dickins
2006-01-27 22:50 ` Brian Twichell
2006-01-30 18:46 ` Ray Bryant
2006-01-31 18:47 ` Brian Twichell
2006-01-31 19:18 ` Dave McCracken
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=20060117235302.GA22451@lnx-holt.americas.sgi.com \
--to=holt@sgi.com \
--cc=akpm@osdl.org \
--cc=dmccr@us.ibm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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