From: Andreas Mohr <andi@lisas.de>
To: Doug Anderson <dianders@chromium.org>
Cc: Brian Norris <briannorris@chromium.org>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Tao Huang <huangtao@rock-chips.com>,
Tony Xie <tony.xie@rock-chips.com>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andreas Mohr <andi@lisas.de>
Subject: Re: [PATCH] timers: Fix usleep_range() in the context of wake_up_process()
Date: Mon, 10 Oct 2016 22:42:14 +0200 [thread overview]
Message-ID: <20161010204214.GA3100@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <CAD=FV=XfQB=BG4o08hmjd5waOHo=PsW=RYhyDSY_kbAJcE6spQ@mail.gmail.com>
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@chromium.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.
next prev parent reply other threads:[~2016-10-10 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 18:47 Douglas Anderson
2016-10-10 19:53 ` Andreas Mohr
2016-10-10 21:16 ` Doug Anderson
2016-10-10 20:04 ` Brian Norris
2016-10-10 20:12 ` Doug Anderson
2016-10-10 20:42 ` Andreas Mohr [this message]
2016-10-10 20:47 ` Andreas Mohr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161010204214.GA3100@rhlx01.hs-esslingen.de \
--to=andi@lisas.de \
--cc=briannorris@chromium.org \
--cc=dianders@chromium.org \
--cc=huangtao@rock-chips.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.xie@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®