Patchwork [2/5] Increase the GGC quite size to 2MB

login
register
mail settings
Submitter Andi Kleen
Date Oct. 9, 2011, 7:55 p.m.
Message ID <1318190141-1220-3-git-send-email-andi@firstfloor.org>
Download mbox | patch
Permalink /patch/118617/
State New
Headers show

Comments

Andi Kleen - Oct. 9, 2011, 7:55 p.m.
From: Andi Kleen <ak@linux.intel.com>

Using 2MB allows modern kernels to use 2MB huge pages on x86.

gcc/:

2011-10-08   Andi Kleen <ak@linux.intel.com>

	* ggc-page.c (GGC_QUIRE_SIZE): Increase to 512
---
 gcc/ggc-page.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Guenther - Oct. 10, 2011, 10:15 a.m.
On Sun, Oct 9, 2011 at 9:55 PM, Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Using 2MB allows modern kernels to use 2MB huge pages on x86.

Ok.

Thanks,
Richard.

> gcc/:
>
> 2011-10-08   Andi Kleen <ak@linux.intel.com>
>
>        * ggc-page.c (GGC_QUIRE_SIZE): Increase to 512
> ---
>  gcc/ggc-page.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
> index b0b3b3f..1f52b56 100644
> --- a/gcc/ggc-page.c
> +++ b/gcc/ggc-page.c
> @@ -469,7 +469,7 @@ static struct globals
>    can override this by defining GGC_QUIRE_SIZE explicitly.  */
>  #ifndef GGC_QUIRE_SIZE
>  # ifdef USING_MMAP
> -#  define GGC_QUIRE_SIZE 256
> +#  define GGC_QUIRE_SIZE 512   /* 2MB for 4K pages */
>  # else
>  #  define GGC_QUIRE_SIZE 16
>  # endif
> --
> 1.7.5.4
>
>
Jan Hubicka - Oct. 10, 2011, 1:50 p.m.
> From: Andi Kleen <ak@linux.intel.com>
> 
> Using 2MB allows modern kernels to use 2MB huge pages on x86.
> 
> gcc/:
> 
> 2011-10-08   Andi Kleen <ak@linux.intel.com>
> 
> 	* ggc-page.c (GGC_QUIRE_SIZE): Increase to 512
> ---
>  gcc/ggc-page.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
> index b0b3b3f..1f52b56 100644
> --- a/gcc/ggc-page.c
> +++ b/gcc/ggc-page.c
> @@ -469,7 +469,7 @@ static struct globals
>     can override this by defining GGC_QUIRE_SIZE explicitly.  */
>  #ifndef GGC_QUIRE_SIZE
>  # ifdef USING_MMAP
> -#  define GGC_QUIRE_SIZE 256
> +#  define GGC_QUIRE_SIZE 512	/* 2MB for 4K pages */
Perhaps comment that 2MB was chosen to help Kernel huge pages logic?

Honza
>  # else
>  #  define GGC_QUIRE_SIZE 16
>  # endif
> -- 
> 1.7.5.4

Patch

diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index b0b3b3f..1f52b56 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -469,7 +469,7 @@  static struct globals
    can override this by defining GGC_QUIRE_SIZE explicitly.  */
 #ifndef GGC_QUIRE_SIZE
 # ifdef USING_MMAP
-#  define GGC_QUIRE_SIZE 256
+#  define GGC_QUIRE_SIZE 512	/* 2MB for 4K pages */
 # else
 #  define GGC_QUIRE_SIZE 16
 # endif