[PATCH] Avoid using up static TLS surplus for optimizations [BZ #25051]
Florian Weimer
fweimer@redhat.com
Thu Jun 4 13:54:49 GMT 2020
* Szabolcs Nagy:
> +void
> +_dl_static_tls_tunables_init (void)
> +{
> + size_t nns, opt_tls;
> +
> +#if HAVE_TUNABLES
> + nns = TUNABLE_GET (nns, size_t, NULL);
> + opt_tls = TUNABLE_GET (optional_static_tls, size_t, NULL);
> +#else
> + /* Default values of the tunables. */
> + nns = 4;
> + opt_tls = 512;
> +#endif
> + if (nns > DL_NNS)
> + nns = DL_NNS;
> + GL(dl_tls_static_optional) = opt_tls;
> + GLRO(dl_tls_static_surplus) = ((nns - 1) * LIBC_IE_TLS
> + + nns * OTHER_IE_TLS
> + + opt_tls);
> +}
I think the default 4 is incompatible with elf/tst-manyaudit. The test
doesn't check that all specified audit modules have been loaded.
I think we can automatically increase the number of namespaces based on
the count of audit modules. This can be a follow-up patch, and I can
work on this.
Thanks,
Florian
More information about the Libc-alpha
mailing list