Description of problem: ntpd/ntpd.c uses HAVE_MLOCKALL etc to figure out if mlockall should be used, but from looking at ntpd changelog, mlockall was disabled on Linux ChangeSet 1.1251 04/11/03 01:51:42 stenn.edu +1 -0 Disable mlockall() under linux for now - resolver problems. that's obvious bs, since mlockall works. (what resolver problems?) now I have /proc/x/stats for ntpd: VmLck: 3000 kB (earlier 0 kB) also, sched_setscheduler is not available. these missing features are important for the operation of ntpd. Version-Release number of selected component (if applicable): 4.2.2-1 How reproducible: always Steps to Reproduce: 1. rpmbuild --rebuild ntp-4.2.2-1.src.rpm 2. 3. Actual results: config.h has default values of no use Expected results: having support for mlockall and sched_setscheduler etc after ./configure Additional info: I'd guess calling aclocal automake autoconf before configure would help a bit, but I leave figuring out autobreak stuffs to the maintainer. Ohh, and mlockall has to be fixed in another way. I added #define HAVE_MLOCKALL and #include <sys/mman.h> into ntpd.c ;-)
Ok, thanks. The mlockall() call will be enabled in ntp-4.2.2-3. But I didn't found anything wrong with the sched_setscheduler, strace ntpd -N shows: sched_setscheduler(0, SCHED_FIFO, { 99 }) = 0 Can you provide more info?
strace showed sched_setscheduler was not being called. This happened because I wasn't using -N option ;-O HAVE_SCHED_SETSCHEDULER is defined in config.h, after all... without calling automake etc.
Fixed in ntp-4.2.2-3.
Broken in 4.2.4-1, 4.2.4-3. No mlockall.
Created attachment 146470 [details] Do it the cruel way: define HAVE_MLOCKALL and include sys/mman.h
Since ntp-4.2.4 mlocking shouldn't be needed as ntpd uses SO_TIMESTAMP option for sockets. Or is there another reason why you need memory locked?
Yes, refclock.
Ok. Majority of users don't need the locking, so I will probably add an option to ntpd that will enable mlockall(). Will this solution be ok for you?
Fine with me.
Ok, ntpd in package ntp-4.2.4-4.fc7 has new option -m to enable memory locking.