Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp946404imu; Wed, 9 Jan 2019 08:57:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN6k8aJcjmG824Mqw2PuwvaJA0QeRBMruPIaWLMo1mTFXNh5S0rUwA4/ZpcIYNyFuzMkac1s X-Received: by 2002:a62:1484:: with SMTP id 126mr6594224pfu.257.1547053079886; Wed, 09 Jan 2019 08:57:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547053079; cv=none; d=google.com; s=arc-20160816; b=ZI0G3/6ZXKgAx3nLUxJYL0MJJT6JBHcDYin7PZMy7iWTLm8hQ/UAm/6KM0GGqM3nBR AoH0m1Yj3t8/bIsLhtCa7UKWqMgZYVMsAoGuZh9hzW2MpOzFfN85A5w+v/rq9tdLt59e OBmHaM+nCTYxZQFWrLDFcEsE4RsgRzgHpABVeOIjH3uxZunJqvvq7A1mtVf/olZoZ67b s/mZPMLNKGrt09hcIQpE68DXdT+LnepYDY6FZzAk4L9mmS3MXfOG5gEbjFHKKfszX0ro XxEdmQiXmc6I399z6x6tsV2kTl5nuTlZJGEV7cyW1OLc5lkCMud+z6H/MX3v0MYpjnVc aDqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kki7GX0S+t7hj/hdc6mJj5VtGMKtQZTAwoWP5KR8oJA=; b=YTroT17HczVKgh+hESk3vIMx/sXVKmax5/HNvo7q6PhWFnNDfWUSUoEQZ2wlfcDVho NB/lBBwny+sOCM4jadFgZl4vvufL0XnSdMi3lTSyNR/mFlqVLaskHGOy4xb0aXBZeodf gwuAc0GSedslQUelMyOTkBHvnblLcUYkDGqOe7/cOzRTQLpS9epvXexFb47/IAUtSL9o RlZz9M14dr/l+yV1PsPBhvnKtKrc9esSiZvT6gQrvSPHPgwDWRZ7xrBVEbHMZdErqTvH cUtoFFPLxXZWQ3VwyZdK/6OPld8qm0UL2nmEW3OQ65thszkgZAyfK++nZAXHmgRTqzKy JAlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+3x8aGD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si3061723plj.334.2019.01.09.08.57.44; Wed, 09 Jan 2019 08:57:59 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Q+3x8aGD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbfAIQz7 (ORCPT + 99 others); Wed, 9 Jan 2019 11:55:59 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:37417 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfAIQz6 (ORCPT ); Wed, 9 Jan 2019 11:55:58 -0500 Received: by mail-io1-f65.google.com with SMTP id g8so6569953iok.4 for ; Wed, 09 Jan 2019 08:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kki7GX0S+t7hj/hdc6mJj5VtGMKtQZTAwoWP5KR8oJA=; b=Q+3x8aGDd/+bdRQp6N+2ZpUI327wJoexTa/6+Tyqu20NnYA2zzh8tCkcaO1tkFHKnA jjLaNk/rS/r2luVOoDyyGqM/ujcSa3DbAgotT3KDq99s784yRD8jrMB5+48pj9RmkFwS 313Ft4ncFR0AyqIIXs4fx2bP7U2xt8BaK5IcA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kki7GX0S+t7hj/hdc6mJj5VtGMKtQZTAwoWP5KR8oJA=; b=Uf8qoEM7yl5OZM/eT/IquBbfNZC61yYIh1ZA15CnltKrw8FcNP/0OIMCHNzw7pjAQv EIZgw2El963UCl7gxI3o/qHrCIKXcDOXVZ3RdTdlDTkSoLBoaood1zFnWAEfANiVOfvA UR7oNi0ym4ieEZzFHkU9qZoMPPQPyRvvMubEeytnPXQCscR6g6r1jIGHDjNagdo/QV1u T8ErGXYy6aQE0a9hXbZQbVNGFFmJoOYLq/wJuHKlAt94nUXk4JnhZSk34bxcEQG5N0Wa o/0vMW2YleD711xYVqTgVl2XQuFIUBo7BkmgYXrzeXDAL+Fc2XCO2n8oHUtQl5oGAL4o yFKg== X-Gm-Message-State: AJcUukdhe8QMtidQws2qr6oB7c+FlrvpZ6F/gAWsUcTtdBLaKj2d2JGF ufv0MsJI1hcUOsOER4btOkuGZLrtsNAh+axRyH0TAlb5yWJe6g== X-Received: by 2002:a6b:c8c9:: with SMTP id y192mr4101980iof.183.1547052957562; Wed, 09 Jan 2019 08:55:57 -0800 (PST) MIME-Version: 1.0 References: <20190107233833.GI5544@atomide.com> <20190108155354.GL5544@atomide.com> <20190108213743.GN5544@atomide.com> <20190109014218.GA8363@linaro.org> <20190109015124.GO5544@atomide.com> <20190109162846.GP5544@atomide.com> <20190109165004.GQ5544@atomide.com> In-Reply-To: <20190109165004.GQ5544@atomide.com> From: Vincent Guittot Date: Wed, 9 Jan 2019 17:55:46 +0100 Message-ID: Subject: Re: Regression in v5.0-rc1 with autosuspend hrtimers To: Tony Lindgren Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Ulf Hansson , "open list:THERMAL" , linux-kernel , LAK , Linux OMAP Mailing List , Ladislav Michl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wro= te: > > > > > > > > > > * Vincent Guittot [190109 01:42]: > > > > > > Le Tuesday 08 Jan 2019 =C3=A0 13:37:43 (-0800), Tony Lindgren a= =C3=A9crit : > > > > > > > Lowering the autosuspend_delay_ms to 2100 ms makes things wor= k again. > > > > > > > Anything higher than 2200 ms seems to somehow time out immedi= ately > > > > > > > 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 =3D time; timer->node.expires =3D ktime_add_safe(time, delta); so the hrtimer will expire between "time" and "time+delta" > > Regards, > > Tony