This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/2] Tunables for glibc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]