[PATCH v5 0/2] Improve surplus TLS accounting

Szabolcs Nagy szabolcs.nagy@arm.com
Fri Jun 26 10:50:01 GMT 2020


The 06/22/2020 17:20, Szabolcs Nagy wrote:
> Addressed the review comments, the tricky static TLS accounting
> bits are unchanged. These are still outstanding:
> 
> > Subsequent followup after committing this:
> > - We need to fix tst-manyaudit.
> > - We should be able to count how many spaces we need based on LD_AUDIT
> >   or DT_AUDIT and enable up to that amount.
> 
> Reran the tests on aarch64 and x86.
> 
> Szabolcs Nagy (2):
>   rtld: Add rtld.nns tunable for the number of supported namespaces
>   rtld: Avoid using up static TLS surplus for optimizations [BZ #25051]

since Carlos reviewed v4
https://sourceware.org/pipermail/libc-alpha/2020-June/115179.html
i attach the v4 to v5 diff in case that helps the review.

i assume the tst-auditmany fix would be something like

void
_dl_tls_static_surplus_init (size_t naudit)
{
  nns = TUNABLE_GET (nns, size_t, NULL);
  if (nns > DL_NNS)
    nns = DL_NNS; // nns = 1 when !SHARED

  if (DL_NNS - nns < naudit)
    _dl_fatal_printf ("too many auditors");
  nns += naudit;

  GLRO(dl_tls_static_surplus) = nns * X + ...;
}

default nns=4 and DL_NNS=16 allows 12 audit modules
(tst-auditmany needs 9) and auditors don't use up
the surplus tls reserved for the application.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surplus-v5.diff
Type: text/x-diff
Size: 17128 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20200626/3b659093/attachment.bin>


More information about the Libc-alpha mailing list