[systemd-devel] Significant performance loss caused by commit a65f06b: journal: return -ECHILD after a fork
Florian Weimer
fw at deneb.enyo.de
Wed Jul 12 09:31:05 UTC 2017
* Lennart Poettering:
> On Tue, 11.07.17 21:26, Florian Weimer (fw at deneb.enyo.de) wrote:
>
>> * Lennart Poettering:
>>
>> > Apparently, this regressed between this version and
>> > glibc-2.24-9.fc25.x86_64 hence.
>>
>> Yes, I backported the fork cache removal to Fedora 25. There is no
>> longer a good way to main such a cache in userspace because glibc
>> cannot intercept anymore all the ways that can change the PID of the
>> current process because the kernel interfaces for process management
>> are incredibly rich these days.
>
> BTW, with this change you are breaking expressly documented behaviour:
>
> http://man7.org/linux/man-pages/man2/getpid.2.html
>
> "Since glibc version 2.3.4, the glibc wrapper function for
> getpid() caches PIDs, so as to avoid additional system calls when
> a process calls getpid() repeatedly."
Note that the manpages project, while extremely valuable, is not
official glibc documentation and sometimes explains library internals
which can change over time.
More information about the systemd-devel
mailing list