On 27.09.2006 [17:07:18 -0500], Adam Litke wrote:
> I am proposing the following changes to the powerpc linker scripts (both
> B and BDT).  This change will align the end of the BSS to a 256M
> boundary.  Due to the restrictions on powerpc allow only one page size
> per 256M chunk of virtual address space, it is possible to have spurious
> remapping and/or malloc failures with some applications.  We're seeing
> it in the case where an application requests segment remapping, but the
> loader mapped a library into the same 256 segment as the BSS.  In this
> case we can unmap the original BSS, but are not able to create it in
> large pages due to the library in the way.  Aligning the bss in this way
> should not cause any harm.  It may cause us to consume a few more huge
> pages in some cases.  This side effect is fixable in the future.
> 
> Does anyone see any problems with doing this?
> 
> Signed-Off-By: Adam Litke <[EMAIL PROTECTED]>
> 
> diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB
> index 8d5cf4d..e45e0d7 100644
> --- a/ldscripts/elf32ppclinux.xB
> +++ b/ldscripts/elf32ppclinux.xB
> @@ -205,10 +205,8 @@ SECTIONS
>        .bss section disappears because there are no input sections.
>        FIXME: Why do we need it? When there is no .bss section, we don't
>        pad the .data section.  */
> -   . = ALIGN(. != 0 ? 32 / 8 : 1);
> +   . = ALIGN(256*1204*1024);

Should that be 1024 there in the middle? Perhaps also add in a comment,
to indicate why the alignment is necessary.

>    } :htlb
> -  . = ALIGN(32 / 8);
> -  . = ALIGN(32 / 8);
>    _end = .;
>    PROVIDE (end = .);
>    /* Stabs debugging sections.  */
> diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT
> index 8794edb..2734ebe 100644
> --- a/ldscripts/elf32ppclinux.xBDT
> +++ b/ldscripts/elf32ppclinux.xBDT
> @@ -199,10 +199,8 @@ SECTIONS
>        .bss section disappears because there are no input sections.
>        FIXME: Why do we need it? When there is no .bss section, we don't
>        pad the .data section.  */
> -   . = ALIGN(. != 0 ? 32 / 8 : 1);
> +    . = ALIGN(256*1024*1024);

I'm guessing the answer is yes to the above, then, since it's 1024 here
and in the other ALIGNs.

Thanks,
Nish

-- 
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to