Received: by 10.223.185.111 with SMTP id b44csp1176963wrg; Fri, 9 Mar 2018 23:43:37 -0800 (PST) X-Google-Smtp-Source: AG47ELuZfwt8uEpmYQ2aj0CXohXTKeykdkbjHc62er1pOEjPSyc3IXuW1cEtRjbaamXuhIAz1/tT X-Received: by 2002:a17:902:57c1:: with SMTP id g1-v6mr1275622plj.381.1520667817451; Fri, 09 Mar 2018 23:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520667817; cv=none; d=google.com; s=arc-20160816; b=QIgOxMXfcpXerjPX4FsXh008kDAwaU66Z3JyAsL1VS5wYAhlO3LCCx8FAsV1xWdM2L 0cf7BOIHqB9rqlsWIyGqeCldmSplzQlhVgHJaFOJy+wralcShAHGxUEJPLaWJyOfkRFy 5wKKxhBIjIDwrcVc7z0CMpOHvsnve00e3UppPuqkZK0vIbCn5lX4zc6qTY9Ig7no9KG8 Kc+pYdlj4oJeHDAuppdyP8TcjAoNwD3gjuXVnPXjuCi59aN5TIbFBoXCQAo5VnQCdv22 O5vhuTg9R6xf75QoWNe7YcoIgg/k1ZAUSbUu3HBOwwImvn58zO3yEq9+xv+B5nqS7jxj 8OSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature :arc-authentication-results; bh=oS+Jga99nAEoPlZ3cW17EZCNklgNvgXNJ8mNpxq9xQY=; b=IjkhlkVeEcioxGy3UUc92V0TFZEQSpeYkk0PL0bQk5dwYKAwKlro2XonjbwS19ie1m +vKhL0E/fa6ZkDN3TulNsCuuy0+I9inysUEWGwmP8i4vkSpQ3WAdvulOskJ8eFuNbAic 2E46JEtqWuGjiQyd5sOfQtURKxdGA5Dc+nbAGEZuYxbDOwcCp0EiT/+BDNrJG05tOn9j +fWt1RxIDm2SRLm95fKFHNd8TFw61DhcUXBSwzdviVR+6PEYqTsY8SoPElj/QFp1xGnn 9BhRz95fXO/PdOcIND/xIQo8NbYPOj5PRtMAaYmBc82w9fYQph36toZkn1zUiULjuI79 9MHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@telus.net header.s=neo header.b=fDwuvt/2; 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=telus.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62si2044555pgc.70.2018.03.09.23.43.11; Fri, 09 Mar 2018 23:43:37 -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 (test mode) header.i=@telus.net header.s=neo header.b=fDwuvt/2; 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=telus.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613AbeCJHlu (ORCPT + 99 others); Sat, 10 Mar 2018 02:41:50 -0500 Received: from cmta20.telus.net ([209.171.16.93]:51564 "EHLO cmta20.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbeCJHls (ORCPT ); Sat, 10 Mar 2018 02:41:48 -0500 Received: from dougxps ([173.180.45.4]) by cmsmtp with SMTP id uZ8OeyItEpl1KuZ8QeJRht; Sat, 10 Mar 2018 00:41:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1520667707; bh=oS+Jga99nAEoPlZ3cW17EZCNklgNvgXNJ8mNpxq9xQY=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=fDwuvt/2f5Cpiefmizu+voueTTjLw3vtafDiCQrxLinFx7YSOEKeWOtJ86eHn+pGx VFQbqlfyfC9vZ1GWSjRC86oMRFV/a3s+pA8VFcAWYr+nSJrqBqcsnWBFbV89QfVb8H AMgtwr6jEfR717C+I2+dTKOZplYV6wuSgB3xEfHaOcS1lK74o/Mvrncze/USonZnc3 3pg7MzEhalHFSP6r11QXKxhabeCl1FafxesQCfgXXu/lI1q3W64nUXDP3CGOw9CrIw /qUo+IEZ00tjjzkTd1jviAjvZ4+hQ16wyjfEVd8R8VF/B8GkABcaL/vkHjHhfbGN6t uQfn/uGTGgoYw== X-Authority-Analysis: v=2.2 cv=Pr98V0E3 c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=IkcTkHD0fZMA:10 a=FGbulvE0AAAA:8 a=vGffbGkmiYaUsvATMv4A:9 a=QEXdDO2ut3YA:10 a=svzTaB3SJmTkU8mK-ULk:22 From: "Doug Smythies" To: "'Rik van Riel'" , "'Rafael J. Wysocki'" , "'Mike Galbraith'" Cc: "'Thomas Gleixner'" , "'Paul McKenney'" , "'Thomas Ilsche'" , "'Frederic Weisbecker'" , "'Linux PM'" , "'Aubrey Li'" , "'LKML'" , "'Peter Zijlstra'" References: <2450532.XN8DODrtDf@aspire.rjw.lan> uJnxe6lrNpApsuJnyelRSD In-Reply-To: uJnxe6lrNpApsuJnyelRSD Subject: RE: [RFC/RFT][PATCH v3 0/6] sched/cpuidle: Idle loop rework Date: Fri, 9 Mar 2018 23:41:39 -0800 Message-ID: <007c01d3b843$3d825e70$b8871b50$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdO3ugnLE8NqFahvTPGHjXiTd6r3dQAGVIBQ Content-Language: en-ca X-CMAE-Envelope: MS4wfLd26KR1jw3mnS8UrntUFqpVuyCz2tgjtCPYPjrLZcY7QptgplgHGdj9kuH7WK6Anni+9nv/e1FBmSI+lcs8G6oMcDgfq+BrE4cUYvhudS9KHyQmQnsC ZukM37gwPlYb8twmIdXPHho7eowwVJqs6FcaRKELTk+8b0J0F4+0LtMy0nhzzt7wnKL7eDr/Mrs3Z0aa+WbAZkWa7QkAKR3i0YhE4O0r1LC/jCpy1LONFLbv LyZPAjuLKughNzPlnhAPP3SsSX/fHjkX5gD3XssuG1Zd5ZpJxL1On7YYFDGAr9SwzJUO/xaOoaIlnWjWIynDrt7v1MxZzlh16ObgP4hXnHZs3y318myXFQfm ok+CVgCQdcKJIffpuR1EXrTGOjS7bYZjxMgYCg9M8pibOPvHZ4H66lut0m0XwCWrUhVN3kk4RIiGznAJPqq8R5CwR72F+Ev90GxhMwv5IPyls4pYuWG+gHc6 uQCyBTCUPzEwxIH5H2LCPtlfr1BGLX5VilDgcA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018.03.09 07:19 Rik van Riel wrote: > On Fri, 2018-03-09 at 10:34 +0100, Rafael J. Wysocki wrote: >> Hi All, >>=20 >> Thanks a lot for the discussion and testing so far! >>=20 >> This is a total respin of the whole series, so please look at it >> afresh. >> Patches 2 and 3 are the most similar to their previous versions, but >> still they are different enough. > > This series gives no RCU errors on startup, > and no CPUs seem to be getting stuck any more. Confirmed on my test server. Boot is normal and no other errors, so far. Part 1: Idle test: I was able to repeat Mike's higher power issue under very light load, well no load in my case, with V2. V3 is much better. A one hour trace on my very idle server was 22 times smaller with V3 than V2, and mainly due to idle state 4 not exiting and re-entering every tick time for great periods of time. Disclaimer: From past experience, 1 hour is not nearly long enough for this test. Issues tend to come in bunches, sometimes many hours apart. V2: Idle State 4: Entries: 1359560 CPU: 0: Entries: 125305 CPU: 1: Entries: 62489 CPU: 2: Entries: 10203 CPU: 3: Entries: 108107 CPU: 4: Entries: 19915 CPU: 5: Entries: 430253 CPU: 6: Entries: 564650 CPU: 7: Entries: 38638 V3: Idle State 4: Entries: 64505 CPU: 0: Entries: 13060 CPU: 1: Entries: 5266 CPU: 2: Entries: 15744 CPU: 3: Entries: 5574 CPU: 4: Entries: 8425 CPU: 5: Entries: 6270 CPU: 6: Entries: 5592 CPU: 7: Entries: 4574 Kernel 4.16-rc4: Idle State 4: Entries: 61390 CPU: 0: Entries: 9529 CPU: 1: Entries: 10556 CPU: 2: Entries: 5478 CPU: 3: Entries: 5991 CPU: 4: Entries: 3686 CPU: 5: Entries: 7610 CPU: 6: Entries: 11074 CPU: 7: Entries: 7466 With apologies to those that do not like the term "PowerNightmares", it has become very ingrained in my tools: V2: 1 hour idle Summary: Idle State 0: Total Entries: 113 : PowerNightmares: 56 : Not PN time = (seconds): 0.001224 : PN time: 65.543239 : Ratio: 53548.397792 Idle State 1: Total Entries: 1015 : PowerNightmares: 42 : Not PN time = (seconds): 0.053986 : PN time: 21.054470 : Ratio: 389.998703 Idle State 2: Total Entries: 1382 : PowerNightmares: 17 : Not PN time = (seconds): 0.728686 : PN time: 6.046906 : Ratio: 8.298370 Idle State 3: Total Entries: 113 : PowerNightmares: 13 : Not PN time = (seconds): 0.069055 : PN time: 6.021458 : Ratio: 87.198002 V3: 1 hour idle Summary: Average processor package power 3.78 watts Idle State 0: Total Entries: 134 : PowerNightmares: 109 : Not PN time = (seconds): 0.000477 : PN time: 144.719723 : Ratio: 303395.646541 Idle State 1: Total Entries: 1104 : PowerNightmares: 84 : Not PN time = (seconds): 0.052639 : PN time: 74.639142 : Ratio: 1417.943768 Idle State 2: Total Entries: 968 : PowerNightmares: 141 : Not PN time = (seconds): 0.325953 : PN time: 128.235137 : Ratio: 393.416035 Idle State 3: Total Entries: 295 : PowerNightmares: 103 : Not PN time = (seconds): 0.164884 : PN time: 97.159421 : Ratio: 589.259243 Kernel 4.16-rc4: Average processor package power (excluding a few = minutes of abnormal power) 3.70 watts. 1 hour idle Summary: Idle State 0: Total Entries: 168 : PowerNightmares: 59 : Not PN time = (seconds): 0.001323 : PN time: 81.802197 : Ratio: 61830.836545 Idle State 1: Total Entries: 1669 : PowerNightmares: 78 : Not PN time = (seconds): 0.022003 : PN time: 37.477413 : Ratio: 1703.286509 Idle State 2: Total Entries: 1447 : PowerNightmares: 30 : Not PN time = (seconds): 0.502672 : PN time: 0.789344 : Ratio: 1.570296 Idle State 3: Total Entries: 176 : PowerNightmares: 0 : Not PN time = (seconds): 0.259425 : PN time: 0.000000 : Ratio: 0.000000 Part 2: 100% load on one CPU test. Test duration 4 hours V3: Summary: Average processor package power 26.75 watts Idle State 0: Total Entries: 10039 : PowerNightmares: 7186 : Not PN time = (seconds): 0.067477 : PN time: 6215.220295 : Ratio: 92108.722903 Idle State 1: Total Entries: 17268 : PowerNightmares: 195 : Not PN time = (seconds): 0.213049 : PN time: 55.905323 : Ratio: 262.405939 Idle State 2: Total Entries: 5858 : PowerNightmares: 676 : Not PN time = (seconds): 2.578006 : PN time: 167.282069 : Ratio: 64.888161 Idle State 3: Total Entries: 1500 : PowerNightmares: 488 : Not PN time = (seconds): 0.772463 : PN time: 125.514015 : Ratio: 162.485472 Kernel 4.16-rc4: Summary: Average processor package power 27.41 watts Idle State 0: Total Entries: 9096 : PowerNightmares: 6540 : Not PN time = (seconds): 0.051532 : PN time: 7886.309553 : Ratio: 153037.133492 Idle State 1: Total Entries: 28731 : PowerNightmares: 215 : Not PN time = (seconds): 0.211999 : PN time: 77.395467 : Ratio: 365.074679 Idle State 2: Total Entries: 4474 : PowerNightmares: 97 : Not PN time = (seconds): 1.959059 : PN time: 0.874112 : Ratio: 0.446190 Idle State 3: Total Entries: 2319 : PowerNightmares: 0 : Not PN time = (seconds): 1.663376 : PN time: 0.000000 : Ratio: 0.000000 Graph of package power verses time: = http://fast.smythies.com/rjwv3_100.png ... Doug