public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 0/2] Tunables for glibc
Date: Fri, 01 Jul 2016 18:31:00 -0000	[thread overview]
Message-ID: <1467397878-11514-1-git-send-email-siddhesh@sourceware.org> (raw)

Hi,

Here's another swipe at the tunables.  As usual, I'll start with an apology for
the very slow turnaround time and especially my tendency to come to this around
freeze time.

This version takes a completely different approach for a couple of reasons and
ends up making the tunables interface simpler to use.  Firstly, the tunables
are now much richer as Florian requested.  A tunable now has a data type
associated with it, with the ability to attach attributes like type, minimum
and maximum values to it as well as calling a callback function.  Additionally,
I got rid of the compatibility interface and included that in the tunable
structure since that is much easier to deal with.

Finally, I've moved the tunables out of the tunables directory and into elf/.
This is because I had overlooked the fact that if we had to control ifuncs
using tunables, they would have to be initialized much earlier.  They are now
initialized along with the LD_* environment variables.  In fact, it might not
be a bad idea to move the LD_* variables under the tunables mechanism as well.

Like last time, the first patch adds a framework for tunables, moving the old
environment variables into the tunables infrastructure and reads them all in
early.  The module (malloc is the example in this case) only has to get the
initialized value (if it has been initialized that is) and optionally call a
function to do additional work based on whether the value has been set via the
envvar.

Patch 2 then introduces the GLIBC_TUNABLES environment variable, which can be
set to a colon-separated list of name=value pairs of tunables.  This is the
contentious bit because there isn't agreement yet on what the final interface
should look like.

Siddhesh Poyarekar (2):
  Add framework for tunables
  Initialize tunable list with the GLIBC_TUNABLES environment variable

 INSTALL                  |   6 ++
 Makeconfig               |  16 ++++
 README.tunables          |  74 +++++++++++++++
 config.h.in              |   3 +
 config.make.in           |   1 +
 configure                |  16 ++++
 configure.ac             |  10 ++
 elf/Makefile             |   5 +
 elf/Versions             |   3 +
 elf/dl-tunable-types.h   |  45 +++++++++
 elf/dl-tunables.c        | 241 +++++++++++++++++++++++++++++++++++++++++++++++
 elf/dl-tunables.h        |  76 +++++++++++++++
 elf/dl-tunables.list     |  50 ++++++++++
 elf/rtld.c               |   8 ++
 malloc/arena.c           |  28 ++++++
 manual/install.texi      |   5 +
 scripts/gen-tunables.awk | 157 ++++++++++++++++++++++++++++++
 17 files changed, 744 insertions(+)
 create mode 100644 README.tunables
 create mode 100644 elf/dl-tunable-types.h
 create mode 100644 elf/dl-tunables.c
 create mode 100644 elf/dl-tunables.h
 create mode 100644 elf/dl-tunables.list
 create mode 100644 scripts/gen-tunables.awk

-- 
2.5.5

             reply	other threads:[~2016-07-01 18:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 18:31 Siddhesh Poyarekar [this message]
2016-07-01 18:31 ` [PATCH 2/2] Initialize tunable list with the GLIBC_TUNABLES environment variable Siddhesh Poyarekar
2016-07-01 18:32 ` [PATCH 1/2] Add framework for tunables Siddhesh Poyarekar
2016-07-01 19:20 ` [PATCH 0/2] Tunables for glibc H.J. Lu
2016-07-01 19:29   ` Siddhesh Poyarekar
2016-07-01 19:32     ` H.J. Lu
2016-07-01 19:39       ` Siddhesh Poyarekar
  -- strict thread matches above, loose matches on Subject: below --
2016-07-02 17:13 [PATCH 0/2] tunables " Siddhesh Poyarekar
2016-07-03  0:24 ` H.J. Lu
2016-07-03  3:08   ` Siddhesh Poyarekar
2016-01-11 11:16 [PATCH 0/2] Tunables " Siddhesh Poyarekar

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=1467397878-11514-1-git-send-email-siddhesh@sourceware.org \
    --to=siddhesh@sourceware.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).