Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Songmao Tian <tiansm@lemote.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] 16K page size in 32 bit kernel
Date: Tue, 31 Jul 2007 17:37:29 +0800	[thread overview]
Message-ID: <46AF02D9.40803@lemote.com> (raw)
In-Reply-To: <20070731130950.GA5540@sw-linux.com>

Thanks Dajie:)

With 22 PGDIR_SHIFT, 15 extra page tables is populated when a whole 64M 
address space is accessed, the patch can save memory quite a bit:)

Dajie Tan wrote:
> 32-bit Kernel for loongson2e currently use 16KB page size to avoid
> cache alias problem.So, the definiton of PGDIR_SHIFT muse be 12+14.
>
> Using 22 in 16K page size do not lead to a serious problem but the number
> of pages allocated for page table is more than previous. (cat
> /proc/vmstat | grep nr_page_table_pages)
>
> It's been tested on FuLong mini PC(loongson2e inside).
>
>
> Signed-off-by: Dajie Tan <jiankemeng@gmail.com>
> ---
>  include/asm-mips/pgtable-32.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
> index 2fbd47e..8d34ebf 100644
> --- a/include/asm-mips/pgtable-32.h
> +++ b/include/asm-mips/pgtable-32.h
> @@ -46,7 +46,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
>  #ifdef CONFIG_64BIT_PHYS_ADDR
>  #define PGDIR_SHIFT	21
>  #else
> -#define PGDIR_SHIFT	22
> +#define PGDIR_SHIFT	(PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 2))
>  #endif
>  #define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
>  #define PGDIR_MASK	(~(PGDIR_SIZE-1))
>
>
>
>
>   

WARNING: multiple messages have this Message-ID (diff)
From: Songmao Tian <tiansm@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] 16K page size in 32 bit kernel
Date: Tue, 31 Jul 2007 17:37:29 +0800	[thread overview]
Message-ID: <46AF02D9.40803@lemote.com> (raw)
Message-ID: <20070731093729.8FvijgJUmAVxTcjW8p95m0Wzi1QnnnJuOueTU0jmtWY@z> (raw)
In-Reply-To: <20070731130950.GA5540@sw-linux.com>

Thanks Dajie:)

With 22 PGDIR_SHIFT, 15 extra page tables is populated when a whole 64M 
address space is accessed, the patch can save memory quite a bit:)

Dajie Tan wrote:
> 32-bit Kernel for loongson2e currently use 16KB page size to avoid
> cache alias problem.So, the definiton of PGDIR_SHIFT muse be 12+14.
>
> Using 22 in 16K page size do not lead to a serious problem but the number
> of pages allocated for page table is more than previous. (cat
> /proc/vmstat | grep nr_page_table_pages)
>
> It's been tested on FuLong mini PC(loongson2e inside).
>
>
> Signed-off-by: Dajie Tan <jiankemeng@gmail.com>
> ---
>  include/asm-mips/pgtable-32.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
> index 2fbd47e..8d34ebf 100644
> --- a/include/asm-mips/pgtable-32.h
> +++ b/include/asm-mips/pgtable-32.h
> @@ -46,7 +46,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
>  #ifdef CONFIG_64BIT_PHYS_ADDR
>  #define PGDIR_SHIFT	21
>  #else
> -#define PGDIR_SHIFT	22
> +#define PGDIR_SHIFT	(PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 2))
>  #endif
>  #define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
>  #define PGDIR_MASK	(~(PGDIR_SIZE-1))
>
>
>
>
>   

  reply	other threads:[~2007-07-31  9:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 13:09 [PATCH] 16K page size in 32 bit kernel Dajie Tan
2007-07-31  9:37 ` Songmao Tian [this message]
2007-07-31  9:37   ` Songmao Tian
2007-07-31 10:00 ` Ralf Baechle
2007-07-31 13:49   ` Songmao Tian
2007-07-31 20:45     ` Ralf Baechle
2007-08-01  0:47       ` Songmao Tian

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=46AF02D9.40803@lemote.com \
    --to=tiansm@lemote.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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