All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: npiggin@suse.de
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	paulus@samba.org
Subject: Re: [patch 6/7] powerpc: implement pte_special
Date: Fri, 06 Jun 2008 14:04:53 +1000	[thread overview]
Message-ID: <1212725093.12464.0.camel@pasglop> (raw)
In-Reply-To: <20080605094826.023234000@nick.local0.net>

On Thu, 2008-06-05 at 19:43 +1000, npiggin@suse.de wrote:
> plain text document attachment (powerpc-implement-pte_special.patch)
> Implement PTE_SPECIAL for powerpc. At the moment I only have a spare bit for
> the 4k pages config, but Ben has freed up another one for 64k pages that I
> can use, so this patch should include that before it goes upstream.
> 
> Signed-off-by: Nick Piggin <npiggin@suse.de>

Ack that bit. _PAGE_SPECIAL will replace _PAGE_HASHPTE on 64K (ie.
0x400). The patch that frees that bit should get into powerpc.git (and
from there -mm) as soon as paulus catches up with his backlog :-)

Cheers,
Ben.

> ---
> Index: linux-2.6/include/asm-powerpc/pgtable-ppc64.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-ppc64.h
> +++ linux-2.6/include/asm-powerpc/pgtable-ppc64.h
> @@ -239,7 +239,7 @@ static inline int pte_write(pte_t pte) {
>  static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;}
>  static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;}
>  static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;}
> -static inline int pte_special(pte_t pte) { return 0; }
> +static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
>  
>  static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
>  static inline void pte_cache(pte_t pte)   { pte_val(pte) &= ~_PAGE_NO_CACHE; }
> @@ -259,7 +259,7 @@ static inline pte_t pte_mkyoung(pte_t pt
>  static inline pte_t pte_mkhuge(pte_t pte) {
>  	return pte; }
>  static inline pte_t pte_mkspecial(pte_t pte) {
> -	return pte; }
> +	pte_val(pte) |= _PAGE_SPECIAL; return pte; }
>  
>  /* Atomic PTE updates */
>  static inline unsigned long pte_update(struct mm_struct *mm,
> Index: linux-2.6/include/asm-powerpc/pgtable-4k.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-4k.h
> +++ linux-2.6/include/asm-powerpc/pgtable-4k.h
> @@ -45,6 +45,8 @@
>  #define _PAGE_GROUP_IX  0x7000 /* software: HPTE index within group */
>  #define _PAGE_F_SECOND  _PAGE_SECONDARY
>  #define _PAGE_F_GIX     _PAGE_GROUP_IX
> +#define _PAGE_SPECIAL	0x10000 /* software: special page */
> +#define __HAVE_ARCH_PTE_SPECIAL
>  
>  /* PTE flags to conserve for HPTE identification */
>  #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \
> Index: linux-2.6/include/asm-powerpc/pgtable-64k.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-64k.h
> +++ linux-2.6/include/asm-powerpc/pgtable-64k.h
> @@ -74,6 +74,7 @@ static inline struct subpage_prot_table 
>  #define _PAGE_HPTE_SUB0	0x08000000 /* combo only: first sub page */
>  #define _PAGE_COMBO	0x10000000 /* this is a combo 4k page */
>  #define _PAGE_4K_PFN	0x20000000 /* PFN is for a single 4k page */
> +#define _PAGE_SPECIAL	0x0	   /* don't have enough room for this yet */
>  
>  /* Note the full page bits must be in the same location as for normal
>   * 4k pages as the same asssembly will be used to insert 64K pages
> 


WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: npiggin@suse.de
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	paulus@samba.org
Subject: Re: [patch 6/7] powerpc: implement pte_special
Date: Fri, 06 Jun 2008 14:04:53 +1000	[thread overview]
Message-ID: <1212725093.12464.0.camel@pasglop> (raw)
In-Reply-To: <20080605094826.023234000@nick.local0.net>

On Thu, 2008-06-05 at 19:43 +1000, npiggin@suse.de wrote:
> plain text document attachment (powerpc-implement-pte_special.patch)
> Implement PTE_SPECIAL for powerpc. At the moment I only have a spare bit for
> the 4k pages config, but Ben has freed up another one for 64k pages that I
> can use, so this patch should include that before it goes upstream.
> 
> Signed-off-by: Nick Piggin <npiggin@suse.de>

Ack that bit. _PAGE_SPECIAL will replace _PAGE_HASHPTE on 64K (ie.
0x400). The patch that frees that bit should get into powerpc.git (and
from there -mm) as soon as paulus catches up with his backlog :-)

Cheers,
Ben.

> ---
> Index: linux-2.6/include/asm-powerpc/pgtable-ppc64.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-ppc64.h
> +++ linux-2.6/include/asm-powerpc/pgtable-ppc64.h
> @@ -239,7 +239,7 @@ static inline int pte_write(pte_t pte) {
>  static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;}
>  static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;}
>  static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;}
> -static inline int pte_special(pte_t pte) { return 0; }
> +static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
>  
>  static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
>  static inline void pte_cache(pte_t pte)   { pte_val(pte) &= ~_PAGE_NO_CACHE; }
> @@ -259,7 +259,7 @@ static inline pte_t pte_mkyoung(pte_t pt
>  static inline pte_t pte_mkhuge(pte_t pte) {
>  	return pte; }
>  static inline pte_t pte_mkspecial(pte_t pte) {
> -	return pte; }
> +	pte_val(pte) |= _PAGE_SPECIAL; return pte; }
>  
>  /* Atomic PTE updates */
>  static inline unsigned long pte_update(struct mm_struct *mm,
> Index: linux-2.6/include/asm-powerpc/pgtable-4k.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-4k.h
> +++ linux-2.6/include/asm-powerpc/pgtable-4k.h
> @@ -45,6 +45,8 @@
>  #define _PAGE_GROUP_IX  0x7000 /* software: HPTE index within group */
>  #define _PAGE_F_SECOND  _PAGE_SECONDARY
>  #define _PAGE_F_GIX     _PAGE_GROUP_IX
> +#define _PAGE_SPECIAL	0x10000 /* software: special page */
> +#define __HAVE_ARCH_PTE_SPECIAL
>  
>  /* PTE flags to conserve for HPTE identification */
>  #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \
> Index: linux-2.6/include/asm-powerpc/pgtable-64k.h
> ===================================================================
> --- linux-2.6.orig/include/asm-powerpc/pgtable-64k.h
> +++ linux-2.6/include/asm-powerpc/pgtable-64k.h
> @@ -74,6 +74,7 @@ static inline struct subpage_prot_table 
>  #define _PAGE_HPTE_SUB0	0x08000000 /* combo only: first sub page */
>  #define _PAGE_COMBO	0x10000000 /* this is a combo 4k page */
>  #define _PAGE_4K_PFN	0x20000000 /* PFN is for a single 4k page */
> +#define _PAGE_SPECIAL	0x0	   /* don't have enough room for this yet */
>  
>  /* Note the full page bits must be in the same location as for normal
>   * 4k pages as the same asssembly will be used to insert 64K pages
> 

--
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:[~2008-06-06  4:05 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05  9:43 [patch 0/7] speculative page references, lockless pagecache, lockless gup npiggin
2008-06-05  9:43 ` npiggin
2008-06-05  9:43 ` [patch 1/7] mm: readahead scan lockless npiggin
2008-06-05  9:43   ` npiggin
2008-06-05  9:43 ` [patch 2/7] radix-tree: add gang_lookup_slot, gang_lookup_slot_tag npiggin
2008-06-05  9:43   ` npiggin
2008-06-05  9:43 ` [patch 3/7] mm: speculative page references npiggin
2008-06-05  9:43   ` npiggin
2008-06-06 14:20   ` Peter Zijlstra
2008-06-06 14:20     ` Peter Zijlstra
2008-06-06 16:26     ` Nick Piggin
2008-06-06 16:26       ` Nick Piggin
2008-06-06 16:27     ` Nick Piggin
2008-06-06 16:27       ` Nick Piggin
2008-06-09  4:48   ` Tim Pepper
2008-06-09  4:48     ` Tim Pepper
2008-06-10 19:08   ` Christoph Lameter
2008-06-10 19:08     ` Christoph Lameter
2008-06-11  3:19     ` Nick Piggin
2008-06-11  3:19       ` Nick Piggin
2008-06-05  9:43 ` [patch 4/7] mm: lockless pagecache npiggin
2008-06-05  9:43   ` npiggin
2008-06-05  9:43 ` [patch 5/7] mm: spinlock tree_lock npiggin
2008-06-05  9:43   ` npiggin
2008-06-05  9:43 ` [patch 6/7] powerpc: implement pte_special npiggin
2008-06-05  9:43   ` npiggin
2008-06-06  4:04   ` Benjamin Herrenschmidt [this message]
2008-06-06  4:04     ` Benjamin Herrenschmidt
2008-06-05  9:43 ` [patch 7/7] powerpc: lockless get_user_pages_fast npiggin
2008-06-05  9:43   ` npiggin
2008-06-09  8:32   ` Andrew Morton
2008-06-09  8:32     ` Andrew Morton
2008-06-10  3:15     ` Nick Piggin
2008-06-10  3:15       ` Nick Piggin
2008-06-10 19:00   ` Christoph Lameter
2008-06-10 19:00     ` Christoph Lameter
2008-06-11  3:18     ` Nick Piggin
2008-06-11  3:18       ` Nick Piggin
2008-06-11  4:40       ` Christoph Lameter
2008-06-11  4:40         ` Christoph Lameter
2008-06-11  4:41         ` Christoph Lameter
2008-06-11  4:41           ` Christoph Lameter
2008-06-11  4:49           ` Nick Piggin
2008-06-11  4:49             ` Nick Piggin
2008-06-11  6:06             ` Andrew Morton
2008-06-11  6:06               ` Andrew Morton
2008-06-11  6:24               ` Nick Piggin
2008-06-11  6:24                 ` Nick Piggin
2008-06-11  6:50                 ` Andrew Morton
2008-06-11  6:50                   ` Andrew Morton
2008-06-11 23:20               ` Christoph Lameter
2008-06-11 23:20                 ` Christoph Lameter
2008-06-11  4:47         ` Nick Piggin
2008-06-11  4:47           ` Nick Piggin
2008-06-05 11:53 ` [patch 0/7] speculative page references, lockless pagecache, lockless gup Nick Piggin
2008-06-05 11:53   ` Nick Piggin
2008-06-05 17:33 ` Linus Torvalds
2008-06-05 17:33   ` Linus Torvalds
2008-06-06  0:08   ` Nick Piggin
2008-06-06  0:08     ` Nick Piggin
2008-06-06 21:32 ` Peter Zijlstra
2008-06-06 21:32   ` Peter Zijlstra

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=1212725093.12464.0.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.