[chrony-dev] [PATCH] sys_posix: support SCHED_FIFO and mlockall on more OSs

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Hi,

The following patch centralizes the memory locking and real-time scheduling
for POSIX systems. It brings support for these features to FreeBSD, NetBSD,
and Solaris. Note that MacOS does support the pthread_setschedparam() API,
but it does not function as intended for real-time scheduling. As such,
MacOS was not included in the patch.

Also note that the memory locking behavior changed ever-so-slightly.
Solaris does not support setrlimit(RLIMIT_MEMLOCK, ...), so this was turned
into an optional call and an additional configure test. It will no longer
prevent memory locking, even if the call fails.

I tested this patch using Linux 4.18 with glibc, FreeBSD 11.2 & 12, NetBSD
8, and Solaris 11.

The documentation needs to be updated for the new support as well. I can
submit this as a separate patch or combine it into one. Your choice.

Regards,
Stefan




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/