[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131119082548.GD10022@twins.programming.kicks-ass.net>
Date: Tue, 19 Nov 2013 09:25:48 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: NeilBrown <neilb@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
lkml <linux-kernel@...r.kernel.org>,
"Dr. H. Nikolaus Schaller" <hns@...delico.com>,
Marek Belisko <marek@...delico.com>,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH/RFC] wait_for_completion_timeout() considered harmful.
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists