Page MenuHomeFreeBSD

add pidfile_signal and use it in mount
ClosedPublic

Authored by mjg on Mar 26 2022, 8:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 8:28 AM
Unknown Object (File)
Tue, Dec 3, 10:37 PM
Unknown Object (File)
Sun, Dec 1, 11:40 PM
Unknown Object (File)
Sun, Dec 1, 11:39 PM
Unknown Object (File)
Sun, Dec 1, 11:39 PM
Unknown Object (File)
Sun, Dec 1, 11:39 PM
Unknown Object (File)
Sun, Dec 1, 3:22 PM
Unknown Object (File)
Sun, Dec 1, 3:22 PM
Subscribers

Details

Summary

this fixes a performance problem where poudriere -j 104 keeps remounting filesystems, which induce wanting to signal mountd, if running. the current code tries to do it by creating the pidfile in /var/run and unlinking it if the operation succeeds. this induces contention against anything doing an exec as it tries to look up /var/run/ld-elf.so.hints

commit 963072c7bae56d6f4d53f52daab6ca23eecff487 (HEAD -> pidfile)
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date:   Fri Mar 11 11:02:28 2022 +0000

    mount: use pidfile_signal

commit 2796d6df18f81e69ee22d43528e275c9cfe3be47
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date:   Fri Mar 11 11:01:50 2022 +0000

    pidfile: add pidfile_signal
Test Plan

started mountd and verified it gets signalled, if running

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Mar 26 2022, 8:22 PM
mjg created this revision.
mjg edited the test plan for this revision. (Show Details)
mjg updated this revision to Diff 104238.
/usr/src/lib/libutil/pidfile.c:369:2: error: implicit declaration of function 'kill' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        kill(pid, sig);

Missing <signal.h>, <sys/types.h>?

This revision was not accepted when it landed; it landed in state Needs Review.Apr 9 2022, 4:02 PM
This revision was automatically updated to reflect the committed changes.