Received: by 10.213.65.68 with SMTP id h4csp1963188imn; Thu, 5 Apr 2018 06:50:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48PfpySpkDd/j6hCf8tlrg/gW28PX7E9EoLp2FwzUmz5PQo2qryeryUWhEXzb3TWTrg8a3Q X-Received: by 10.99.110.198 with SMTP id j189mr14732442pgc.71.1522936255783; Thu, 05 Apr 2018 06:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522936255; cv=none; d=google.com; s=arc-20160816; b=AhQUtSKH65+LdBp/47XlRu+AYOI1ntV5VoY8ktv8yFsrJTqbAhSQ6d4Tjm8s7WN31v j2bMlyI7EfB3HIUVA2o+Pu4fwo2w85B38js6dSri5FbZAevW/USdLSipS9+34EuLhLgO DtGI23l7ptVclEG3+cd6/rEetbaVSYxgCsPo4K5jPznlCwOc9+y4v+qXw+W3X7OEkTiY LQOeujW6K4oUKVP6HhOdVQ24FemrGWWxeWai2iUdTSOPRY9nrEiu+c9hqZRAikecua04 Z808BMnfa3zY4O39MSjSfkcoUI+hauBk0NMAUWDRkSSZ0XshrkxTZW7ieEw19asTi13U bPFA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=45bh5kp87gNl4Z0w5dod5vPYRjdgbXvjtLMrnoCd5Wk=; b=K/Sn7ex1xrr4YyHD2RGezDLkUMv9bYu5tbjZ1Hd0edx4sJ5ZudvibWSfEV0cJTCCCV bdTr//LJWut9Hlwkq+94mQqH8uFCuWZtDocitvE7pWPcS32DzeBnx8eeSsx/ReuWOgJp JoIPkTylbAy66HumQGe9TBvqNHul5gTCr57LvTqnfHKThdGv7/v6RXCQuf0gEJj/AQlu rrtWnE3UVTxij8vP7L1Eb/lSj6r/YPBLg4eYjVX+Zu0KV1YBmhMjUaoYXkzhA7u8zc8v 1VPtJKmdA0mGwY+DoowEoAob6Cy35WztZjG/vcAC56KkAOcfPl8f4EFIUCKbopFydRVg ROUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hcdge2kJ; 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 c6-v6si6150178plr.620.2018.04.05.06.50.41; Thu, 05 Apr 2018 06:50:55 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hcdge2kJ; 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 S1751384AbeDENtg (ORCPT + 99 others); Thu, 5 Apr 2018 09:49:36 -0400 Received: from mail-ot0-f180.google.com ([74.125.82.180]:42095 "EHLO mail-ot0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbeDENte (ORCPT ); Thu, 5 Apr 2018 09:49:34 -0400 Received: by mail-ot0-f180.google.com with SMTP id h55-v6so25716620ote.9; Thu, 05 Apr 2018 06:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=45bh5kp87gNl4Z0w5dod5vPYRjdgbXvjtLMrnoCd5Wk=; b=hcdge2kJO+pFVNCQnVDmC/UqOA+SdCiqCEAbeTF2bnE6tB4kDHAPt39M9PfyvLZdo5 a+jJbHsS8xc9+uWBv+/F+kU8wYEjKbmw3/0qRxCAp4h116fx6DJgd98hqeLMKYsPVIJt 3Zv9SXylEwZ1HDkRV+sY4C/0x+9jUAmq6LVzYrDxmhNvmA5lewVnn89NrGBfcNzNFyay SiEyYjUVqiuNLMiPnESJijQvyjL6QZ1lMcklST5JpftzqOcJXwynW3QnLaWNNiB/EnFV MG7m8KyBq4PCMx3U0Iqs4raE9PtDYKr3wV8kAfKUpBaVRbdqfv8QDOVXk72tg2BiZpUy iYZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=45bh5kp87gNl4Z0w5dod5vPYRjdgbXvjtLMrnoCd5Wk=; b=GBvY6pvepz4wr4lvxMSjdVjILYvWxRoFw7aa9gCioGbrelYMGPrCPnUT445fLsQ31i vq8moXg0pM5PMPayqtdDb9F+FcNxlrss9zwaath2WvyyShkOEdwN5Q8kx5PUVm3gN++x h3euDLeQ35raKZ7UntVYnmYXYj95kuFAyzrWG6YVAxW0LarxsonTmR9ApPoOu7pJsrYy ED5W7qoyXN+HseJQCRW68KQtPGafbQ74URo/A921L8RSopc1Z/mOnk8pwPxU5xf4Qvyi k4thrOZH8hR14XRfUX/7LcHnIAsMcjlmBWmQPyGhQ2gZAhj9v21T+FCTnndzgs9qRwET 8JAQ== X-Gm-Message-State: AElRT7EFAspEuDVzStfojaf+Gkhu63/1kS4A6gwZ8HpqGroD6GIngxjr OCPBQ0/rdeCSJ3djpZJUY6ELUICBhtGoG3f/EKY= X-Received: by 2002:a9d:5b44:: with SMTP id e4-v6mr12679242otj.305.1522936173420; Thu, 05 Apr 2018 06:49:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:9f7:0:0:0:0:0 with HTTP; Thu, 5 Apr 2018 06:49:32 -0700 (PDT) In-Reply-To: <20180405124757.GQ4082@hirez.programming.kicks-ass.net> References: <1736751.LdhZHb50jq@aspire.rjw.lan> <6542020.eHGLEK9V0J@aspire.rjw.lan> <20180405124757.GQ4082@hirez.programming.kicks-ass.net> From: "Rafael J. Wysocki" Date: Thu, 5 Apr 2018 15:49:32 +0200 X-Google-Sender-Auth: NommpsFV3CvO7hjTnq6wgH8K7ek Message-ID: Subject: Re: [PATCH v9 10/10] cpuidle: menu: Avoid selecting shallow states with stopped tick To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM , Frederic Weisbecker , Thomas Gleixner , Paul McKenney , Thomas Ilsche , Doug Smythies , Rik van Riel , Aubrey Li , Mike Galbraith , LKML , Len Brown 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 Thu, Apr 5, 2018 at 2:47 PM, Peter Zijlstra wrote: > On Wed, Apr 04, 2018 at 10:50:36AM +0200, Rafael J. Wysocki wrote: >> + if (tick_nohz_tick_stopped()) { >> + /* >> + * If the tick is already stopped, the cost of possible short >> + * idle duration misprediction is much higher, because the CPU >> + * may be stuck in a shallow idle state for a long time as a >> + * result of it. In that case say we might mispredict and try >> + * to force the CPU into a state for which we would have stopped >> + * the tick, unless the tick timer is going to expire really >> + * soon anyway. > > Wait what; the tick was stopped, therefore it _cannot_ expire soon. > > *confused* > > Did you mean s/tick/a/ ? Yeah, that should be "a timer".