Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759323AbcJTJxr (ORCPT ); Thu, 20 Oct 2016 05:53:47 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47670 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754597AbcJTJxn (ORCPT ); Thu, 20 Oct 2016 05:53:43 -0400 Date: Thu, 20 Oct 2016 11:51:12 +0200 (CEST) From: Thomas Gleixner To: Daniel Kurtz cc: Doug Anderson , John Stultz , Tao Huang , Brian Norris , Andreas Mohr , "linux-kernel@vger.kernel.org" , "open list:ARM/Rockchip SoC..." , Tony Xie , Akihiro Tsukada Subject: Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() In-Reply-To: Message-ID: References: <1476133442-17757-1-git-send-email-dianders@chromium.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 985 Lines: 19 On Thu, 20 Oct 2016, Daniel Kurtz wrote: > On Wed, Oct 19, 2016 at 4:29 AM, Doug Anderson wrote: > > ...but I'm not sure I agree with you about what to do here. > > Specifically I think that whatever we do we need to try to keep > > schedule_hrtimeout_range() and schedule_timeout() parallel. For > > schedule_timeout() we have the same comments but it's my understanding > > that you'd expect that wake_up_process() would wake it up. In any > > case, if wake_up_process() doesn't wake it up then it seems like > > msleep() and schedule_timeout_uninterruptible() are the same function > > with two names, when in fact one is implemented in terms o the other. > > Sounds reasonable. > It would be nice to add a note to all of those function comments > though to make them sound less absolute - > "at least @timeout time is guaranteed to pass before the routine > returns unless the current task is explicitly woken up, (e.g. by > wake_up_process())" Agreed.