mbox series

[v3,0/4] System-wide tunables

Message ID cover.1728595809.git.dj@redhat.com
Headers show
Series System-wide tunables | expand

Message

DJ Delorie Oct. 10, 2024, 9:42 p.m. UTC
This patch series is the initial implementation of system-wide
tunables, which I mentioned a while ago.

The first part has ldconfig read tunable information from
/etc/tunables.conf and store it to /etc/ld.so.cache.  Reusing ldconfig
means no new documentation or training would be required of sysadmins,
or reprogramming of distro packaging.

The second part optimizes the loading of /etc/ld.so.cache and allows
for it to be loaded independently of searching for libraries, so that
tunables information can be loaded as needed.

The third part applies the stored tunable information to the running
application.

The fourth part adds simple filtering, allowing the admin to override
or augment tunables on a per-process basis, like this:

	glibc.malloc.whatever=10
	[qemu]
	glibc.malloc.whatever=20

Note that such filters only last until EOF or the beginning of the
next included config file.

Changes since v1: fixed format bug in error() and rebased.  No other
  changes.

Changes since v2: Added per-process filter.  Rebased.  Probably various
  tweaks and minor changes.


DJ Delorie (4):
  Add system-wide tunables: ldconfig part
  Add system-wide tunables: cache ld.so.cache
  Add system-wide tunables: Apply tunables part
  Add system-wide tunables: Filters

 csu/libc-start.c                        |   2 +-
 elf/Makefile                            |   5 +
 elf/cache.c                             |  66 +++-
 elf/dl-cache.c                          | 278 +++++++++----
 elf/dl-tunables.c                       | 118 +++++-
 elf/dl-tunables.h                       |   2 +-
 elf/ldconfig.c                          |  21 +-
 elf/tst-tunconf1.c                      |  17 +
 elf/tst-tunconf1.root/etc/tunables.conf |   2 +
 elf/tst-tunconf1.root/ldconfig.run      |   0
 elf/tst-tunconf1.root/postclean.req     |   0
 elf/tunconf.c                           | 498 ++++++++++++++++++++++++
 elf/tunconf.h                           |  43 ++
 sysdeps/generic/dl-cache.h              |   6 +
 sysdeps/generic/ldconfig.h              |   2 +
 sysdeps/mach/hurd/dl-sysdep.c           |   2 +-
 sysdeps/unix/sysv/linux/dl-sysdep.c     |   2 +-
 17 files changed, 970 insertions(+), 94 deletions(-)
 create mode 100644 elf/tst-tunconf1.c
 create mode 100644 elf/tst-tunconf1.root/etc/tunables.conf
 create mode 100644 elf/tst-tunconf1.root/ldconfig.run
 create mode 100644 elf/tst-tunconf1.root/postclean.req
 create mode 100644 elf/tunconf.c
 create mode 100644 elf/tunconf.h