[PATCH, PPC] Use 64k for COMMONPAGESIZE

Sebastian Huber sebastian.huber@embedded-brains.de
Fri Dec 19 08:45:00 GMT 2014


Hello Alan,

On 19/12/14 09:16, Alan Modra wrote:
> On Thu, Dec 18, 2014 at 04:41:19PM +1030, Alan Modra wrote:
>> >On Thu, Dec 18, 2014 at 10:26:03AM +1100, Chris Johns wrote:
>>> > >On 17/12/2014 12:34 pm, Richard Henderson wrote:
>>>> > > >It seems to me that most powerpc hardware these days is server based,  and very
>>>> > > >little remains at the desktop class.
>>> > >
>>> > >What about embedded devices with as Freescale's QorIQ T2080 and T4240 ?
>>> > >
>>>> > > >And in the server environment, IBM has
>>>> > > >been recommending a 64k page size.
>>> > >
>>> > >Would this change effect RTEMS and it devices ?
>> >
>> >Yes, it would.  However, the effect isn't huge one way or another.
>> >
>> >Richard quoting IBM's recommendation of a 64k page size really hasn't
>> >anything to do with COMMONPAGESIZE, or at least not as much as you
>> >might think..  You can quite happily run a binary linked with
>> >COMMONPAGESIZE set to 4k on a system using 64k pages.  COMMONPAGESIZE
>> >or -z common-page-size is really about where the linker starts the
>> >data segment, following on from the text segment.  It boils down to
>> >a trade-off between memory pages and disk pages, and the net result of
>> >increasing COMMONPAGESIZE to 64k for a system running with 4k pages
>> >is that you'll tend to have bigger on-disk binaries but won't use any
>> >more memory than with the "proper" 4k COMMONPAGESIZE.  On the other
>> >hand if you really are running with 64k pages, there will be binaries
>> >where you could save a 64k page of memory if you'd specified the
>> >proper COMMONPAGESIZE at link time.
>> >
>> >Overall, I think the increased COMMONPAGESIZE is beneficial, so I'm
>> >happy with the patch.
> One other thing I'd forgotten about is that COMMONPAGESIZE is used to
> decide where the relro segment ends (which after reading some bug
> reports, I guess is the driving force behind this patch).  This
> particular usage*can*  increase memory footprint so my "won't use more
> memory" remark above is incorrect.
>
> You could argue that using COMMONPAGESIZE for this purpose is a bug,
> and that MAXPAGESIZE should determine the relro segment end instead..

is this change relevant if I use a custom linker command file that is 
supposed to place all sections into a defined memory region?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Binutils mailing list