On 15 December 2011 13:06, Linus Walleij linus.walleij@linaro.org wrote:
On Thu, Dec 15, 2011 at 1:16 PM, Daniel Lezcano daniel.lezcano@linaro.org wrote:
[Me]
It is easy to reproduce with 'time sleep 1' where the timer expires 1, 2 or 3 seconds later.
It seems that does not happen with linux-linaro-3.1 but I was able to reproduce the problem on a vanilla kernel 3.1.5.
Is it a known problem ?
Sleeps are only guaranteed at max speed.
I am not sure to get the point. Do you mean cpufreq max frequency ?
It means that the kernel idea of sleep(1) is, sleep atleast 1 second, possibly more. When the system scales down frequency, say to half the frequency, things start to take twice the time. So sleep(1) may result in 2 seconds of sleep or so.
In that situation will multiple sleep's on different CPUs behave consistently or could they take wildly different amounts of time?
The patches below are intended to address this...
I wonder if this is my problem with membase; I'll try and give it a go. In particular it has a testsuite that's designed to exercise it's data expiry mechanism, where it stores some data telling it to expire it in 1 seconds time, then the test suite has a 2 second sleep, and then sees if the data is still there - which it is some annoyingly small fraction of the time.
Dave