From: Peter Zijlstra <peterz@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
"Dr. H. Nikolaus Schaller" <hns@goldelico.com>,
Marek Belisko <marek@goldelico.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH/RFC] wait_for_completion_timeout() considered harmful.
Date: Tue, 19 Nov 2013 09:25:48 +0100 [thread overview]
Message-ID: <20131119082548.GD10022@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20131119104438.6d45828b@notabene.brown>
On Tue, Nov 19, 2013 at 10:44:38AM +1100, NeilBrown wrote:
> We have loops that have
> timeout = schedule_timeout(timeout)
> in the middle and if we change the semantics of schedule_timeout() to round
> up, those loops could wait quite a bit longer than expected.
Depends on what you expect; most of these functions have documentation
that says they will sleep at least timeout amount of time.
schedule_timeout()'s version looks like:
* Make the current task sleep until @timeout jiffies have
* elapsed.
Clearly it doesn't do that currently, so adding 1 will actually make it
do what it says on the tin.
next prev parent reply other threads:[~2013-11-19 8:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 21:06 [PATCH/RFC] wait_for_completion_timeout() considered harmful NeilBrown
2013-11-18 23:27 ` Andrew Morton
2013-11-18 23:42 ` Peter Zijlstra
2013-11-19 0:49 ` Jonathan Corbet
2013-11-19 7:05 ` Ingo Molnar
2013-11-19 8:29 ` Peter Zijlstra
2013-11-18 23:44 ` NeilBrown
2013-11-19 8:25 ` Peter Zijlstra [this message]
2013-11-19 8:58 ` NeilBrown
2013-11-19 12:23 ` Peter Zijlstra
2013-11-19 14:39 ` Thomas Gleixner
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=20131119082548.GD10022@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=hns@goldelico.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek@goldelico.com \
--cc=mingo@redhat.com \
--cc=neilb@suse.de \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.