Received: by 10.213.65.68 with SMTP id h4csp165961imn; Wed, 21 Mar 2018 15:17:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELun0JA64PHsOUvf9ES7abh7Nxh9wYDGEB6d3v49LrFDM11U1tQyUs4n26XNWO6NI98SJUi7 X-Received: by 2002:a17:902:56c:: with SMTP id 99-v6mr21786110plf.53.1521670628180; Wed, 21 Mar 2018 15:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521670628; cv=none; d=google.com; s=arc-20160816; b=MP2v4E4Tb2rmG0Ti7tVWBAn4wrjahgjbWN9VX9kNYZ3S16UVxc2gEkf3JgcnU5SO+r L19VRNofC9ANi0eDPa6mT6/uADn6vVwn2vJwVR4pGOAa8fSV4Uj+FFZHH1LzlxUxLzSh Y/+s40mEwlN0EWgIsxPoUOSnQJ9lFny5wieT5NbwJQCKkmDw4+QKw0I8lJ1OV26w6MaD Nl4ql2qA80GoEPoXqJMlSUNcN1H8DKSlokWsX7J/53aysVVIQRaqdO2jLH6rqF3yFvAe 7ANgFskFxAVDPhQ5r5qwQ34wmfER812X5/Gpqhf3P3w3vpZftuLuEMdr3O4gMUlV5noY Bm3Q== 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=7CX02sR7sSgr6+iLPth8CY9sHUOdL4uLsMYQXpyMn8Q=; b=I36TwEzMMyXaaTWTkGU4AnWVErdR9nwfYXD4GC06NNiylI0xOC6vKCUwe0rKaVQN2f HfAwLE8eE+GwrHP2XO7MhHhiNyOfuNzYphl2aVAg1GdDjVekliLcV/xNBo8WCHiyplwZ E2B+SkssmX3MF8BGg+/W+XXjZyuTnajEKaOJSIF3PvMDwhGbBdta+GzPiye7N25u0dNb wyyP2U9S5y2LcqHYloQv/0NADtY4e8t0zgB6cizOpd+M0n+WKo6JINTDWRvnqFnaUakY y76jM/OG4tJSkyvPAOpYmnRJs1E0LhaJ5EWbcokRvhQTx0oE8t3nAKxdaR9cS6xTnL5W 7+Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EDIRR97Q; 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 d8si3756745pfb.349.2018.03.21.15.16.53; Wed, 21 Mar 2018 15:17:08 -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=EDIRR97Q; 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 S1753996AbeCUWPI (ORCPT + 99 others); Wed, 21 Mar 2018 18:15:08 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:38844 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753826AbeCUWPD (ORCPT ); Wed, 21 Mar 2018 18:15:03 -0400 Received: by mail-ot0-f193.google.com with SMTP id 95-v6so7351173ote.5; Wed, 21 Mar 2018 15:15:03 -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=7CX02sR7sSgr6+iLPth8CY9sHUOdL4uLsMYQXpyMn8Q=; b=EDIRR97QqizEA1Y6w0h1SyGsq7OA4r6KQcqfnakFzYpHcgeCJn8fxpQHzaMzaEZCOp JiHJbSx09V9U7pgXoTpl5qFfBO0bhcdDoW4zTeXqAiTzEBis7Y83WoM/yDdnL71jxI/u kuHeln5jO0c34FLT7rEL6We5poftry7y0oxsxWDvyfsWfo40ITKTOXGkjINgnegqLwWS sIMfYcsOqBNaAG/o/ovxPtNKBrmxubc8e7x95NQtoG1VZGLiYJAgHCc+8mW9J7U/n/rS ih115YgvIbkQ93xC92m88TVf7O2wGOgNSRhJFHPKB3zpvIO49LcMWngTW6YX7rHUvUQE 3uBA== 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=7CX02sR7sSgr6+iLPth8CY9sHUOdL4uLsMYQXpyMn8Q=; b=fnFTFM8c5HuPbbDeTNLtenwGU8mtWQyTbWL/3xNfPTEo+XfX7ykbL1bYQV8QL73OZE 680Rf/KwtHdRyBsjLLsz0JIPZGy9EIeUpRlkTYMDkAPoYDCjTlwAklCd/kd+kQQpJhyj JfwEB6G8WF3l1OIDWS0rl4Vt32QIPbjWobv1/i/GfTIjOokCmebRTDpmD2ht70vxqLhE Q/m2l52kY60YV8DJT5qEc47m0WnXa+k4ARdjJBzMHEwQiPPKBUcm0qS+qOL99i9lNC7O f4Hc+/+EDElEOlzdi3WFDypc/FAP3POyci9mDSveR3HEL8otxWvgAUX3RUvgEZ+ZI1Cc aBJg== X-Gm-Message-State: AElRT7FoCyZCFBRcSnnnV6sC6xV7hnaCTHpJIqQaX4ffHkCinh3GCyqL wIczC6V9m7G6ATXUFKTPzg8c4aCMSwufxLJ3ia0= X-Received: by 2002:a9d:5b44:: with SMTP id e4-v6mr12673438otj.305.1521670502667; Wed, 21 Mar 2018 15:15:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:9f7:0:0:0:0:0 with HTTP; Wed, 21 Mar 2018 15:15:01 -0700 (PDT) In-Reply-To: References: <2390019.oHdSGtR3EE@aspire.rjw.lan> <1635957.yuHkCe9oyz@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Wed, 21 Mar 2018 23:15:01 +0100 X-Google-Sender-Auth: SThFWxlApilA4ju_xd7Wh0w7XuY Message-ID: Subject: Re: [RFT][PATCH v7 5/8] cpuidle: Return nohz hint from cpuidle_select() To: Thomas Ilsche Cc: "Rafael J. Wysocki" , Linux PM , Peter Zijlstra , Frederic Weisbecker , Thomas Gleixner , Paul McKenney , Doug Smythies , Rik van Riel , Aubrey Li , Mike Galbraith , LKML Content-Type: multipart/mixed; boundary="000000000000c6f8890567f3852b" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000c6f8890567f3852b Content-Type: text/plain; charset="UTF-8" On Wed, Mar 21, 2018 at 6:59 PM, Thomas Ilsche wrote: > On 2018-03-21 15:36, Rafael J. Wysocki wrote: >> >> >> So please disregard this one entirely and take the v7.2 replacement >> instead of it:https://patchwork.kernel.org/patch/10299429/ >> >> The current versions (including the above) is in the git branch at >> >> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ >> idle-loop-v7.2 > > > With v7.2 (tested on SKL-SP from git) I see similar behavior in idle > as with v5: several cores which just keep the sched tick enabled. > Worse yet, some go only in C1 (not even C1E!?) despite sleeping the > full sched tick. > The resulting power consumption is ~105 W instead of ~ 70 W. > > https://wwwpub.zih.tu-dresden.de/~tilsche/powernightmares/v7_2_skl_sp_idle.png > > I have briefly ran v7 and I believe it was also affected. Then it looks like menu_select() stubbornly thinks that the idle duration will be within the tick boundary on those cores. That may be because the bumping up of the correction factor in menu_reflect() is too conservative or it may be necessary to do something radical to measured_us in menu_update() in case of a tick wakeup combined with a large next_timer_us value. For starters, please see if the attached patch (on top of the idle-loop-v7.2 git branch) changes this behavior in any way. --000000000000c6f8890567f3852b Content-Type: text/x-patch; charset="US-ASCII"; name="cpuidle-menu-menu_reflect-debug.patch" Content-Disposition: attachment; filename="cpuidle-menu-menu_reflect-debug.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jf1n9a0y0 LS0tCiBkcml2ZXJzL2NwdWlkbGUvZ292ZXJub3JzL21lbnUuYyB8ICAgIDIgKy0KIDEgZmlsZSBj aGFuZ2VkLCAxIGluc2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKSW5kZXg6IGxpbnV4LXBtL2Ry aXZlcnMvY3B1aWRsZS9nb3Zlcm5vcnMvbWVudS5jCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGxpbnV4LXBtLm9y aWcvZHJpdmVycy9jcHVpZGxlL2dvdmVybm9ycy9tZW51LmMKKysrIGxpbnV4LXBtL2RyaXZlcnMv Y3B1aWRsZS9nb3Zlcm5vcnMvbWVudS5jCkBAIC00OTgsNyArNDk4LDcgQEAgc3RhdGljIHZvaWQg bWVudV9yZWZsZWN0KHN0cnVjdCBjcHVpZGxlXwogCQkgKiBjb3JyZWN0aW9uIGZhY3Rvci4gIFVz ZSAwLjc1ICogUkVTT0xVVElPTiAod2hpY2ggaXMgZWFzeQogCQkgKiBlbm91Z2ggdG8gZ2V0KSB0 aGF0IHNob3VsZCB3b3JrIGZpbmUgb24gdGhlIGF2ZXJhZ2UuCiAJCSAqLwotCQluZXdfZmFjdG9y ICs9IFJFU09MVVRJT04gLyAyICsgUkVTT0xVVElPTiAvIDQ7CisJCW5ld19mYWN0b3IgKz0gUkVT T0xVVElPTjsKIAkJZGF0YS0+Y29ycmVjdGlvbl9mYWN0b3JbZGF0YS0+YnVja2V0XSA9IG5ld19m YWN0b3I7CiAJfSBlbHNlIHsKIAkJZGF0YS0+bmVlZHNfdXBkYXRlID0gMTsK --000000000000c6f8890567f3852b--