Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp952989imu; Wed, 9 Jan 2019 09:03:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN5WO2Y1SQd0t0+W403mtpV20ftW6s0gBZxdVRzMmLXe6UUlb46YX4kMvh8/qfO0rw236wQV X-Received: by 2002:a63:2315:: with SMTP id j21mr6152306pgj.297.1547053423480; Wed, 09 Jan 2019 09:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547053423; cv=none; d=google.com; s=arc-20160816; b=j365a9QAqtplDi8DjR0g8zz+BwncXdo+QqLHNFf+4jVoF1U4FbqIItPrjMveUQ2xPG U6dhVyXYUcwFfg/RyBryf+kgb0vM8EMoRj+rE/ESWN/hiRFNxIL58JzkLyuW0ogL7UxB 1JdocGJprgzLndKVxnyRP9ovbRfOZXWeSG8vOOsa2wCw5h5Y+7D4Z02GJQ8XGsRyDL3A VHIWbHCJmW1Dy3vNXvgKIbXhl2V5t/cKPKu4645Tc7F80B1rpGAfY+Yjeb3TwMmeRg3S 7Lyi/+yoOrHGeJWFbm5lvhbi7yoQ8JCxTbpSVKXzSHgkaS+6AJWMZUR/ID/crUe3/eTs vh/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=djTfbKFYzga8wMya+byvBKPzWxlQQ/t6wzmkIile780=; b=ur8sgiQDt5UjOi4wCwRTisq1YXpifhs5qN39Zto/HwEsKN46gY13tev7N07YCMf/nZ FhLD3p5t3s/sqnVKj9iDdqxVRVbBuz80uNcM8M5u1065Qy3DN5lfhL8Si6E0tJPDiNbb qTkSc5F/kWfcg4PCkm1iynidD32Kvz+DE8tcujhBfDuGat3CidQplrLrTu27Wmck2DNZ dQmPMJsCohcwwb0xqrPcQCVgeBMZP0TO/cWNTAVmpnoRhh2U8WYgziN5jG+1gAz1lMOV o7ezXKEc8WCWbh65c/SbKdcKfKjtXCRKbaGXKaQ6vvo1BYPaXraXLyNhR8xVa92MHDlW R3gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si47270913plc.0.2019.01.09.09.03.25; Wed, 09 Jan 2019 09:03:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbfAIRCK (ORCPT + 99 others); Wed, 9 Jan 2019 12:02:10 -0500 Received: from muru.com ([72.249.23.125]:32818 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbfAIRCK (ORCPT ); Wed, 9 Jan 2019 12:02:10 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 605A580C5; Wed, 9 Jan 2019 17:02:15 +0000 (UTC) Date: Wed, 9 Jan 2019 09:02:06 -0800 From: Tony Lindgren To: Vincent Guittot Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Ulf Hansson , "open list:THERMAL" , linux-kernel , LAK , Linux OMAP Mailing List , Ladislav Michl Subject: Re: Regression in v5.0-rc1 with autosuspend hrtimers Message-ID: <20190109170206.GS5544@atomide.com> References: <20190108155354.GL5544@atomide.com> <20190108213743.GN5544@atomide.com> <20190109014218.GA8363@linaro.org> <20190109015124.GO5544@atomide.com> <20190109162846.GP5544@atomide.com> <20190109165004.GQ5544@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Vincent Guittot [190109 16:56]: > On Wed, 9 Jan 2019 at 17:50, Tony Lindgren wrote: > > > > * Vincent Guittot [190109 16:48]: > > > On Wed, 9 Jan 2019 at 17:28, Tony Lindgren wrote: > > > > > > > > * Rafael J. Wysocki [190109 09:44]: > > > > > On Wed, Jan 9, 2019 at 2:51 AM Tony Lindgren wrote: > > > > > > > > > > > > * Vincent Guittot [190109 01:42]: > > > > > > > Le Tuesday 08 Jan 2019 à 13:37:43 (-0800), Tony Lindgren a écrit : > > > > > > > > Lowering the autosuspend_delay_ms to 2100 ms makes things work again. > > > > > > > > Anything higher than 2200 ms seems to somehow time out immediately > > > > > > > > now :) > > > > > > > > > > > > > > This is quite close to the max ns of an int on arm 32bits > > > > > > > > > > > > > > Could you try the patch below ? > > > > > > > > > > > > Yup great thanks, that's it: > > > > > > > > > > > > Tested-by: Tony Lindgren > > > > > > > > > > Cool. Thanks for getting to the bottom of this! > > > > > > > > No problem. > > > > > > > > One more thing I noticed: The 25% slack can get noticeable > > > > for larger values. For things like a 3 second uart console > > > > timeout slack of 750 ms is quite large variation. > > > > > > > > Should we have a limit of max 100 ms for the slack? > > > > > > Keep in mind that when jiffies were used, expires was rounded to a > > > full second when delay was greater than a second. So you could already > > > have difference of up 990ms on arm before this patch > > > And i don't take into account the rework of timer infra which add > > > another level of variation, something like up to 640 ms more when the > > > timer is greater than 2880 ms for arm IIRC > > > > I think it was rounded up earlier. > > > > Don't we get rounded down now also? > > We still round up. In hrtimer we have : > timer->_softexpires = time; > timer->node.expires = ktime_add_safe(time, delta); > so the hrtimer will expire between "time" and "time+delta" OK thanks for checking it. In that case we should be good to go :) Tony