linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: 'Hugh Dickins' <hugh@veritas.com>, Dave McCracken <dmccr@us.ibm.com>
Cc: 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: Fri, 20 Jan 2006 13:54:34 -0800	[thread overview]
Message-ID: <200601202154.k0KLsYg04513@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0601202020001.8821@goblin.wat.veritas.com>

Hugh Dickins wrote on Friday, January 20, 2006 1:24 PM
> More comments, mostly trivial, against extracts from the patch below.
> (Quite often I comment on one instance, but same applies in similar places.)
> 
> > --- 2.6.15/./include/asm-x86_64/pgtable.h	2006-01-02 21:21:10.000000000 -0600
> > +++ 2.6.15-shpt/./include/asm-x86_64/pgtable.h	2006-01-03 10:30:01.000000000 -0600
> > @@ -324,7 +321,8 @@ static inline int pmd_large(pmd_t pte) {
> >  /*
> >   * Level 4 access.
> >   */
> > -#define pgd_page(pgd) ((unsigned long) __va((unsigned long)pgd_val(pgd) & PTE_MASK))
> > +#define pgd_page_kernel(pgd) ((unsigned long) __va((unsigned long)pgd_val(pgd) & PTE_MASK))
> > +#define pgd_page(pgd)		(pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT))
> 
> Hmm, so pgd_page changes its meaning: is that wise?  Looks like it isn't
> used much outside of include/ so perhaps you're okay, and I can see the
> attraction of using "_page" for something that supplies a struct page *.
> I can also see the attraction of appending "_kernel" to the other,
> following pte_offset_kernel, but "_kernel" isn't really appropriate.
> Musing aloud, no particular suggestion.

I was wondering about that myself too:  in current code, pgd_page() and
pud_page() deviate from pmd_page and pte_page in terms of symmetry.  The
first two return virtual address of the pgd_val or pud_val, while pmd_page
and pte_page both return point of struct page of underlying entry.  Is
the asymmetry intentional?


Because the way shared page table uses pgd_page and pud_page, it causes
every arch who wants to enable the feature to redefine pgd_page and
pud_page, not exactly nice though.

- Ken

--
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>

  reply	other threads:[~2006-01-20 21:54 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
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 [this message]
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=200601202154.k0KLsYg04513@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.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