Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2837386imm; Mon, 13 Aug 2018 01:03:15 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyZCJyM3MlGMkl0AlxcLXW46zo9nmR4K4yN0RG2c8cyLoOyqfvSL1Kp2yLTq6+IbiGCeG4N X-Received: by 2002:a17:902:6bc5:: with SMTP id m5-v6mr15571555plt.274.1534147395298; Mon, 13 Aug 2018 01:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534147395; cv=none; d=google.com; s=arc-20160816; b=lpnd5wUyFgQUh2OXUerkIqdyIZWFgE7c9LC06ccWA+QexBASwbkKihdMXMhSwAKETP tb/UUsKAnMbuChTu5tLcbpc3hChZLZk0XvKXnvZV3iu0U1DGx907BCU1BR9AAw2ISF7B OyvMaHvczT+cIXwf26YlpyznAHf8gLNiv1aFDmVz/xYT0UBaDCxvBSwtzLUJpK1JwbRi 2GTJ3vuvlTs7JdJm8whSARLwMr4gKNDc9eY3jxsoYJHMINvy/XRZ447KIScy0J/8LZPR 2ofTY6JjYp6v1UxD1WIhbtVR1kDQYvrLYxUHE+yom3k+DPgekg6DpnuNk61v09MeTl+n Ol5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=/saEVxGbS3k5A4i6SGFNmFZkf2bD61q/wgEVGHf2mNA=; b=esg+hhyh6f6YulGA/bmbXqCEKFsEo8hIliJORbAYn4feZLmfJYE26CdYSp0DlVAk2o xijEMowv5nsDmIvHoqUfeYj90c3X+2IFWrxottnFZprXwFZnkKzu0yUzW8CumWFeO1eq DVpqi8klk0WPfBlVonzNmkVTnpkkFNjyrevbBVLRO7bO7PrREzlP/FtVO04CgHozDsgT TD/C89Od+goU21MmoM05xGHf5P1Z8Q27ECnjCYWIGb7J7Hvm8L1lP/Le+WzoXiP9dD0d MWfWcD+r6jCa0Pvsnks7/0WExgAaAvTjnQCL6OrcKH2BQJMpHtVsuGvT+mIbgi7sHSUu DO2Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l84-v6si17996383pfb.69.2018.08.13.01.03.00; Mon, 13 Aug 2018 01:03:15 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728733AbeHMKmk (ORCPT + 99 others); Mon, 13 Aug 2018 06:42:40 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41141 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbeHMKmk (ORCPT ); Mon, 13 Aug 2018 06:42:40 -0400 Received: by mail-oi0-f66.google.com with SMTP id k12-v6so25748433oiw.8; Mon, 13 Aug 2018 01:01:32 -0700 (PDT) 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; bh=/saEVxGbS3k5A4i6SGFNmFZkf2bD61q/wgEVGHf2mNA=; b=PhTVg3aqE2cv0zU+hEmwcvDJZ2gXEjDXwvrs/vn0yAmM6g2nVR6PDTgGiWx6mEsoQC /Ys/2qbDWg69/bN80RE9rusezMzeknV8zROPV1fj6QJSdJ1bHGONwC/AkgPfPT8PMaJO roh9F8bfz5AwSynT3FokLsQsVPeyG1dJaJEZjB68t2MoCG98P90gANG8qYW7QrNSXygs rIgh18yCnhUROxrS7riaLcqPJVGkSCkc4/yGr6qC0k2JQ9l1XLNFS0pmpm8V8SlgWcft B/zjRpuVh8w8EYG8gGkjqxUXNYunwR5ZGU+1/PKJyHUEA4keXmans+oAXFjEC7Cqw3J5 vjfw== X-Gm-Message-State: AOUpUlGApPYY/VOZ56ty4uDI824ie9nY0ME8z7cpAiPMC9RjrKX6eOjY IyNx4aR9q2bYVcY9ZNOtmdBhfy0ewcO/O+TPYHk= X-Received: by 2002:aca:ad4f:: with SMTP id w76-v6mr18365461oie.233.1534147292042; Mon, 13 Aug 2018 01:01:32 -0700 (PDT) MIME-Version: 1.0 References: <1533835203-5789-1-git-send-email-leo.yan@linaro.org> <1533835203-5789-2-git-send-email-leo.yan@linaro.org> <20180810071321.GC11817@leoy-ThinkPad-X240s> <20180810084906.GD11817@leoy-ThinkPad-X240s> <20180810090327.GE11817@leoy-ThinkPad-X240s> <20180812160740.GC28966@leoy-ThinkPad-X240s> In-Reply-To: <20180812160740.GC28966@leoy-ThinkPad-X240s> From: "Rafael J. Wysocki" Date: Mon, 13 Aug 2018 10:01:20 +0200 Message-ID: Subject: Re: [RESEND PATCH v1 1/2] cpuidle: menu: Correct the criteria for stopping tick To: Leo Yan Cc: "Rafael J. Wysocki" , Rafael Wysocki , Peter Zijlstra , Daniel Lezcano , Vincent Guittot , Linux Kernel Mailing List , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 12, 2018 at 6:07 PM wrote: > > On Sun, Aug 12, 2018 at 01:12:41PM +0200, Rafael J. Wysocki wrote: > > On Fri, Aug 10, 2018 at 11:03 AM wrote: [cut] > > > > Assuming shot noise wakeups, if > > drv->states[drv->state_count-1].target_residency is less than > > TICK_USEC, the tick will be stopped for CPUs more often on average > > with the patch applied (simply because the idle duration range for > > which it will not be stopped is narrower then). > > Yes, good point, so in the new approach I try to change the code > to compare with next tick delta rather than TICK_USEC, it can keeps > running tick for the tick with long expire time (similiar with > comparing with TICK_USEC) but we also can stop tick if the tick is likely > to break idle residency. We tried something similar and the results were not encouraging. Please see https://lore.kernel.org/lkml/079e16b6-2e04-2518-0553-66becab226a6@tu-dresden.de/