public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Daniel Black <daniel@mariadb.org>
Cc: libc-alpha@sourceware.org, aarcange@redhat.com
Subject: Re: ld.so - text and .data application segments to huge pages
Date: Thu, 04 Feb 2021 11:28:30 +0100	[thread overview]
Message-ID: <87o8h0m8j5.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CABVffEMvuFXUcZBcDs8GQM=CttHeZcV-=0nDJ022pH5KQy4Nzg@mail.gmail.com> (Daniel Black's message of "Thu, 4 Feb 2021 18:58:34 +1100")

* 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


  reply	other threads:[~2021-02-04 10:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  7:58 Daniel Black
2021-02-04 10:28 ` Florian Weimer [this message]
2021-02-11  7:53   ` Daniel Black

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=87o8h0m8j5.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=daniel@mariadb.org \
    --cc=libc-alpha@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).