[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADyApD27DEZ+gWijd9Mgqg-riBQcv3zhBfP1+xvhe44ePJk_7w@mail.gmail.com>
Date: Sun, 26 Jun 2016 12:21:46 -0700
From: Arjan van de Ven <arjanvandeven@...il.com>
To: Pavel Machek <pavel@....cz>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <umgwanakikbuti@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Eric Dumazet <edumazet@...gle.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Chris Mason <clm@...com>,
Arjan van de Ven <arjan@...radead.org>, rt@...utronix.de,
Rik van Riel <riel@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
George Spelvin <linux@...encehorizons.net>,
Len Brown <lenb@...nel.org>, ltp@...ts.linux.it
Subject: Re: [patch V2 00/20] timer: Refactor the timer wheel
On Sun, Jun 26, 2016 at 12:00 PM, Pavel Machek <pavel@....cz> wrote:
>
> Umm. I'm not sure if you should be designing kernel...
>
> I have alarm clock application. It does sleep(60) many times till its
> time to wake me up. I'll be very angry if sleep(60) takes 65 seconds
> without some very, very good reason.
I'm fairly sure you shouldn't be designing alarm clock applications!
Because on busy systems you get random (scheduler) delays added to your timer.
Having said that, your example is completely crooked here, sleep()
does not use these kernel timers, it uses hrtimers instead.
(hrtimers also have slack, but an alarm clock application that is this
broken would have the choice to set such slack to 0)
What happened here is that these sigtimewait were actually not great,
it is just about the only application visible interface that's still
in jiffies/HZ,
and in the follow-on patch set, Thomas converted them properly to
hrtimers as well to make them both accurate and CONFIG_HZ independent.
Powered by blists - more mailing lists