Thank you for the patch. I applied it and am now able to get times less than 20 ms. However the time is now off by 1 ms instead of 10. A sleep of 10 ms goes 11 ms and a 1 ms sleep goes 2ms. See attached.
Stephen Graf -----Original Message----- From: owner-...@openbsd.org <owner-...@openbsd.org> On Behalf Of Artturi Alm Sent: May 21, 2018 2:18 AM To: s_g...@telus.net Cc: arm@openbsd.org Subject: Re: nanosleep issue On Sun, May 20, 2018 at 11:54:43PM -0700, s_g...@telus.net wrote: > Does nanosleep work properly on arm? On my orangepione (Allwinner > H3), I can not get a nanosleep of less than 20 milliseconds and > anything above that seems to sleep 10 milliseconds more than what is > requested. > Hi, it does, but it's apparently undocumented in nanosleep(2), that the default HZ of =100 is something for not-really-a-modern-machine.. There's a diff[0] to fix that, and it's something i have on most of my branches, but i was told the diff/thread needs no bumping on tech@, so it is on users to cope with this, i guess. Good luck:) -Artturi [0] https://marc.info/?l=openbsd-tech&m=150274123011009&w=2