[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Oct 2016 22:42:14 +0200
From: Andreas Mohr <andi@...as.de>
To: Doug Anderson <dianders@...omium.org>
Cc: Brian Norris <briannorris@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
John Stultz <john.stultz@...aro.org>,
Tao Huang <huangtao@...k-chips.com>,
Tony Xie <tony.xie@...k-chips.com>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andreas Mohr <andi@...as.de>
Subject: Re: [PATCH] timers: Fix usleep_range() in the context of
wake_up_process()
On Mon, Oct 10, 2016 at 01:12:39PM -0700, Doug Anderson wrote:
> Hi,
>
> On Mon, Oct 10, 2016 at 1:04 PM, Brian Norris <briannorris@...omium.org> wrote:
> > I believe 'min' is unmodified throughout, and therefore 'kmin' is
> > computed to be the same minimum timeout in each loop. Shouldn't this be
> > decreasing on each iteration of the loop? (i.e., either your compute
> > 'kmin' differently here, or you recompute 'min' based on the elapsed
> > time?)
>
> Yes, I stupidly changed something at the last second and then didn't
> test again after my stupid change. Fix coming soon with all comments
> addressed. Sorry for posting broken code. :( :( :(
With a loop style that is actively re-calculating things,
such implementations should then not fall into the trap of
basing the "next" value on "current" time,
thereby bogusly accumulating scheduling-based delays
with each new loop iteration etc.
(i.e., things should still be based on hard, precise termination according to
an *initially* calculated, *absolute*, *minimum* expiry time).
Andreas Mohr
--
GNU/Linux. It's not the software that's free, it's you.
Powered by blists - more mailing lists