[chrony-dev] [PATCH] sys_posix: support SCHED_FIFO and mlockall on more OSs |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH] sys_posix: support SCHED_FIFO and mlockall on more OSs
- From: "Stefan R. Filipek" <srfilipek@xxxxxxxxx>
- Date: Sat, 13 Apr 2019 10:06:09 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wOb8jMDtfiDzh9YPT92a92/c/+ZbV3e4OyhWr2UBQXg=; b=pVURyJiI2iEoJzzO60hFz5WvlRsC8qJSBBXRDh+QvhUL5OVi5ADKoEsp4M7aJumHrz dcqoOe5FYPyWfDbcZhMDCFLdOSuGdcsnQJWsbFvmDAmUzhqxQBIk+vhdu5Zc37lOTQVy WFSVe06fJK7+xQuIki65zYZxZgZwkfwo2soFJ3ntbH9H1BMMAdwTblStm6GHgTJj+9An 6tBMGsQ0hymRbnzEpZY6N1XFVFltWser8RwqwkbJQoHF3+CQlTQSdDrTifS6w3YfEyJv r5EIDb+fR+Y+uf9mbzOPKm1He3qoPzRaWtuJHLsgQQbPSPH+PyOZaA03ZezyHIwNHp6E FLww==
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