[systemd-devel] Significant performance loss caused by commit a65f06b: journal: return -ECHILD after a fork

Lennart Poettering lennart at poettering.net
Wed Jul 12 08:46:47 UTC 2017


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."

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list