RFC: Implement __libc_single_threaded support
Florian Weimer
fweimer@redhat.com
Mon Feb 4 18:54:00 GMT 2019
* Rich Felker:
> So all your optimization is doing is saving one level of indirection
> for access from shared libraries. It does not save any expensive setup
> for PC-relative access on archs where it's expensive.
That's correct. I'd like to hear the point of view of architecture
maintainers on this matter.
I can prepare a patch using just one variable if someone wants to run
actual performance measurements. Other aspects of the complexity will
remain, though. I don't think the thread counter should be read
directly, but rather an infrequently updated variable, as in the current
patch. Registration would go away, but the complicated rules for
updates of the single-threaded indicator in statically linked processes
which use dlopen would remain. However, dlmopen support would come
naturally as long as we put the variable into the (globally shared)
dynamic loader.
Thanks,
Florian
More information about the Libc-alpha
mailing list