public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* ld.so - text and .data application segments to huge pages
@ 2021-02-04  7:58 Daniel Black
  2021-02-04 10:28 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Black @ 2021-02-04  7:58 UTC (permalink / raw)
  To: libc-alpha

Hi,

I received this exceptionally large (slightly convoluted) patch to
MariaDB to move the .text and .data sections to huge pages in the
MariaDB issue https://jira.mariadb.org/browse/MDEV-24051.

The author Dmitriy Philimonov (Huawei) claimed great gains of "9% in
TPS speedup. iTLB && dTLB misses reduced in 38 times and 5 times
respectively. Latency becomes lower, the jitter in the TPS reduced
significantly", so it's definitely beneficial.

Obviously maintaining such a large loader work around in a userspace
application is going to be a burden on the skill set of developers we
have available.

How complex would it be for the glibc elf loader to use huge pages for
data segments on load? (extending _dl_map_segments with an environment
variable control like LD_HUGEPAGES I assume).

Is there any required kernel work to implement this feature?

Would such a concept be supported by the developer community here?

If so I'm happy to write up a feature request (https://sourceware.org/bugzilla).

Anyone off hand interested in writing it?

Cheers,

Daniel
MariaDB Foundation

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ld.so - text and .data application segments to huge pages
  2021-02-04  7:58 ld.so - text and .data application segments to huge pages Daniel Black
@ 2021-02-04 10:28 ` Florian Weimer
  2021-02-11  7:53   ` Daniel Black
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2021-02-04 10:28 UTC (permalink / raw)
  To: Daniel Black; +Cc: libc-alpha, aarcange

* Daniel Black:

> Hi,
>
> I received this exceptionally large (slightly convoluted) patch to
> MariaDB to move the .text and .data sections to huge pages in the
> MariaDB issue https://jira.mariadb.org/browse/MDEV-24051.
>
> The author Dmitriy Philimonov (Huawei) claimed great gains of "9% in
> TPS speedup. iTLB && dTLB misses reduced in 38 times and 5 times
> respectively. Latency becomes lower, the jitter in the TPS reduced
> significantly", so it's definitely beneficial.
>
> Obviously maintaining such a large loader work around in a userspace
> application is going to be a burden on the skill set of developers we
> have available.
>
> How complex would it be for the glibc elf loader to use huge pages for
> data segments on load? (extending _dl_map_segments with an environment
> variable control like LD_HUGEPAGES I assume).
>
> Is there any required kernel work to implement this feature?
>
> Would such a concept be supported by the developer community here?
>
> If so I'm happy to write up a feature request (https://sourceware.org/bugzilla).
>
> Anyone off hand interested in writing it?

I think the kernel already supports this via transparent hugepages, if
you increase the segment alignment via those link editor flags (as in
the proposed patch).

Cc:ing Andrea for additional comments.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ld.so - text and .data application segments to huge pages
  2021-02-04 10:28 ` Florian Weimer
@ 2021-02-11  7:53   ` Daniel Black
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Black @ 2021-02-11  7:53 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha, aarcange

On Thu, Feb 4, 2021 at 9:28 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Daniel Black:
>
> > Hi,
> >
> > I received this exceptionally large (slightly convoluted) patch to
> > MariaDB to move the .text and .data sections to huge pages in the
> > MariaDB issue https://jira.mariadb.org/browse/MDEV-24051.
> >
> > The author Dmitriy Philimonov (Huawei) claimed great gains of "9% in
> > TPS speedup. iTLB && dTLB misses reduced in 38 times and 5 times
> > respectively. Latency becomes lower, the jitter in the TPS reduced
> > significantly", so it's definitely beneficial.
> >
> > Obviously maintaining such a large loader work around in a userspace
> > application is going to be a burden on the skill set of developers we
> > have available.
> >
> > How complex would it be for the glibc elf loader to use huge pages for
> > data segments on load? (extending _dl_map_segments with an environment
> > variable control like LD_HUGEPAGES I assume).
> >
> > Is there any required kernel work to implement this feature?
> >
> > Would such a concept be supported by the developer community here?
> >
> > If so I'm happy to write up a feature request (https://sourceware.org/bugzilla).
> >
> > Anyone off hand interested in writing it?
>
> I think the kernel already supports this via transparent hugepages, if
> you increase the segment alignment via those link editor flags (as in
> the proposed patch).

Thanks Florian, sounds like a good move to me.

> Cc:ing Andrea for additional comments.

Still welcome if you have time/insights.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-11  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04  7:58 ld.so - text and .data application segments to huge pages Daniel Black
2021-02-04 10:28 ` Florian Weimer
2021-02-11  7:53   ` Daniel Black

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).