Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bad sleep time resolution of nanosleep(2)



On Tue, Nov 24, 2015 at 01:58:15AM +0100, Rhialto wrote:
> > 
> > Well, it is rounded up first to whole ticks, that's the easy part. Next
> > the callout is scheduled at the tick boundary and then the LWP is
> > unblocked and scheduled again. It will run in the next scheduling cycle
> > unless nothing else is running?
> 
> I tried it on some fairly idle machines, and the result was quite
> consistent. It really looks like there is something in there that
> inadvertently always causes an extra tick delay.

The extra tick is added to ensure that the minumum sleep time is met.
Otherwise the sleep will be too short if called just before s tick.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index