Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10045694imu; Wed, 5 Dec 2018 15:07:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/XreDhE8SpvcwGDX9pq8+IlXurpDiwl4Ez/bKcnT7kRYK5kQ4gRShJgg/QzjA09rL8sTja/ X-Received: by 2002:a17:902:7614:: with SMTP id k20mr4531368pll.285.1544051239607; Wed, 05 Dec 2018 15:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544051239; cv=none; d=google.com; s=arc-20160816; b=mUdKpAtG+bdzOo4QFTywjTHFUvsESvyBjZjC6/nQP8/ow1rwXWYTzkoFwD/h/NSIEB aR4g4zwLvZ5c51whPhMekE436zOJGDOo9cKZFXoMu0eKQA0/K9X1vcRVnh1D1LAuV2v/ iNfBgsh5J3Uj5aC2Tcx7XbFMr8fXU3GAHO7ntsp1LNB23fMH0Bxl04YtcYOeGrUp5zwQ yJxS1wXzrK/ko9bu/ol3DwHrYsn4KpavAy05TXZ2IWedc99c+5aPtWGdyAYqZVu61Xh6 65MSPdhgHFZy4XPPDJsBQEcnsE18DWQ28M2jz0r2hBGAL/Ws3PRDk2WNb+qCcgMz96ax r0Kw== 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; bh=iiDkuUXGDkKK0d88NSWmOd4F/gGl1vbOm8NSFqATgfE=; b=Yy9hwOjCYBbjO1kOfqqjwvvSWIDx/b8sRYB16HyFntzNZe0LXQYeas5LB6B8ygzCKy wqTdrYsKc5JpAfmROFRkzuNI5eJX+EmR2/wsmkkf17OtEf8QGqpyc9fqNdLtBUxZZRLg /khOuBRSiON8+GmQFsetmCZkXD03gJ3QT6jfjU9Xts+o/o8Np/Gp9v0vzUEeaX2nbft8 yK9ghRiuygd4bbHc0x5SJjiZWrxoKVezHNyWXuzq08A7ue18FYPljyGdJLaP8Yf8+w9A c3JL7NxL5i+cJFclj6NpSlZ7r7MtWfuVkfF7brNn/Jm6A5e+59RxJ0wwN+frH33m6iAx n/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@telus.net header.s=neo header.b=Aq0uad+X; 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 e25si16918484pgv.486.2018.12.05.15.07.03; Wed, 05 Dec 2018 15:07:19 -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=Aq0uad+X; 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 S1728559AbeLEXGP (ORCPT + 99 others); Wed, 5 Dec 2018 18:06:15 -0500 Received: from cmta16.telus.net ([209.171.16.89]:60966 "EHLO cmta16.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727679AbeLEXGP (ORCPT ); Wed, 5 Dec 2018 18:06:15 -0500 Received: from dougxps ([173.180.45.4]) by cmsmtp with SMTP id UgF5gGKVcPTKIUgF6gIlWb; Wed, 05 Dec 2018 16:06:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1544051173; bh=iiDkuUXGDkKK0d88NSWmOd4F/gGl1vbOm8NSFqATgfE=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=Aq0uad+XCU9YljxpBLNDua0KBPIv1shwlkSMSD4+A1hkdmaZ+BJKOPVMwOrf1C+RL 0l0SaBnie58k/rz2JRSA2X7sehjLRc5CKyR2L3Z+6O8hVkbxAlpOMq30Z5jpDbBw3t U/8/FKO4d2kmcjP3FIt7alADb3Kg/P1bFMnEhl/9uF2oEAsU29uRpe7KiXAIhnIwTc 85PdKk/JpfzwSmkAp1prf9UlmUPULW2UZ/fO6zpwBvX/DTkW5h05Gho+yDxn3KQfLd orWy8NJ7tcoTQXymA+FhPFc5V+WeAC3VVaN3m6HC5669avakq/KLYmUu+fOrTFruS5 7A+Jg8PMKjg4A== X-Authority-Analysis: v=2.3 cv=ScEmicZu c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=kj9zAlcOel0A:10 a=RQEsy13LsdxU4s_QaawA:9 a=Mnl_tZ6p8BeDrPqz:21 a=dEhgL4zssbhsfoJQ:21 a=CjuIK1q_8ugA:10 From: "Doug Smythies" To: "'Rafael J. Wysocki'" Cc: "'Giovanni Gherdovich'" , "'Srinivas Pandruvada'" , "'Peter Zijlstra'" , "'Linux Kernel Mailing List'" , "'Frederic Weisbecker'" , "'Mel Gorman'" , "'Daniel Lezcano'" , "'Linux PM'" , "Doug Smythies" References: <001901d48881$29ea59d0$7dbf0d70$@net> TxwEg6mkVwifMTxwJgBHov In-Reply-To: TxwEg6mkVwifMTxwJgBHov Subject: RE: [RFC/RFT][PATCH v6] cpuidle: New timer events oriented governor for tickless systems Date: Wed, 5 Dec 2018 15:06:05 -0800 Message-ID: <006801d48cef$1d476e80$57d64b80$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdSLYpooKIXuaYZySA2GtxFdiiIGXgBSVqqQ Content-Language: en-ca X-CMAE-Envelope: MS4wfNMIxpvUOl6NGLORgNBS7TFa5YeEQCf2JpQpJW5W4ekycF/dXqf86VuKrFJTffnHy9sr+RHv1xrlby0XXcpUtRgr9vuyKMsnSDWEc2oONsCGE0YAynX2 87oRAFuLPOBb2RVn7aN8NmLkW7d7wTsaGiX0mTyd44nWgH9v33oNuIESmtrcPNp9fokEfH1kuosizjzlkreaQMaddnBd8/4og687j3I6eK86w6xCMSsbJQag VEZ/c5TTtBn5RukK82iAZBx9hGzH5xCOb28SQmcB1bW1IlnXduJEx50XmeHRdj9b1ALeSIl3qWquQUiX70BXB8a615BMiI+pakVXyM0JPnXr29yU3yqriUqN PCcZHwWRmEUJTXTXOy4meGmfM/9SF54rX5996tFob2+0Z7/8WNWmqDqq0mJ8IhGBDpjuRbnyOMWN71sRgXPTfaEICFFQIhbzF3SfuUaDJ67iL3NjOG/92Ws0 zYEU7vhQqDpTxdsT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018.12.03 03:48 Rafael J. Wysocki wrote: >>> There is an additional issue where if idle state 0 is disabled (with the above suggested code patch), >>> idle state usage seems to fall to deeper states than idle state 1. >>> This is not the expected behaviour. >> >> No, it isn't. >> >>> Kernel 4.20-rc3 works as expected. >>> I have not figured this issue out yet, in the code. >>> >>> Example (1 minute per sample. Number of entries/exits per state): >>> State 0 State 1 State 2 State 3 State 4 Watts >>> 28235143, 83, 26, 17, 837, 64.900 >>> 5583238, 657079, 5884941, 8498552, 30986831, 62.433 << Transition sample, after idle state 0 disabled >>> 0, 793517, 7186099, 10559878, 38485721, 61.900 << ?? should have all gone into Idle state 1 >>> 0, 795414, 7340703, 10553117, 38513456, 62.050 >>> 0, 807028, 7288195, 10574113, 38523524, 62.167 >>> 0, 814983, 7403534, 10575108, 38571228, 62.167 >>> 0, 838302, 7747127, 10552289, 38556054, 62.183 >>> 9664999, 544473, 4914512, 6942037, 25295361, 63.633 << Transition sample, after idle state 0 enabled >>> 27893504, 96, 40, 9, 912, 66.500 >>> 26556343, 83, 29, 7, 814, 66.683 >>> 27929227, 64, 20, 10, 931, 66.683 >> >> I see. >> >> OK, I'll look into this too, thanks! > > This probably is the artifact of the fix for the teo_find_shallower_state() > issue. > > Anyway, I'm not able to reproduce this with the teo_find_shallower_state() issue > fixed differently. I am not able to reproduce with your teo_find_shallower_state(), or teo V 7, either. Everything is graceful now, as states are disabled: (10 seconds per sample. Number of entries/exits per state): State 0 State 1 State 2 State 3 State 4 Watts 0, 6, 4, 1, 414, 3.700 2, 4, 30, 3, 578, 3.700 << No load 168619, 37, 39, 4, 480, 5.600 << Transition sample 4643618, 45, 8, 1, 137, 61.200 << All idle states enabled 4736227, 40, 3, 5, 111, 61.800 1888417, 4369314, 25, 2, 89, 62.000 << Transition sample 0, 7266864, 9, 0, 0, 62.200 << state 0 disabled 0, 7193372, 9, 0, 0, 62.700 0, 5539898, 1744007, 0, 0, 63.500 << Transition sample 0, 0, 8152956, 0, 0, 63.700 << states 0,1 disabled 0, 0, 8015151, 0, 0, 63.900 0, 0, 4146806, 6349619, 0, 63.000 << Transition sample 0, 0, 0, 13252144, 0, 61.600 << states 0,1,2 disabled 0, 0, 0, 13258313, 0, 61.800 0, 0, 0, 10417428, 1984451, 61.200 << Transition sample 0, 0, 0, 0, 9247172, 58.500 << states 0,1,2,3 disabled 0, 0, 0, 0, 9242657, 58.500 0, 0, 0, 0, 9233749, 58.600 0, 0, 0, 0, 9238444, 58.700 0, 0, 0, 0, 9236345, 58.600 For reference, this is kernel 4.20-rc5 (with your other proposed patches): State 0 State 1 State 2 State 3 State 4 Watts 0, 4, 8, 6, 426, 3.700 1592870, 279, 149, 96, 831, 21.800 5071279, 154, 25, 6, 105, 61.200 5095090, 78, 21, 1, 86, 61.800 5001493, 94, 30, 4, 101, 62.200 616019, 5446924, 5, 3, 38, 62.500 0, 6249752, 0, 0, 0, 63.300 0, 6293671, 0, 0, 0, 63.800 0, 3751035, 2529964, 0, 0, 64.100 0, 0, 6101167, 0, 0, 64.500 0, 0, 6172526, 0, 0, 64.700 0, 0, 6163797, 0, 0, 64.900 0, 0, 1724841, 9567528, 0, 63.300 0, 0, 0, 13349668, 0, 62.700 0, 0, 0, 13360471, 0, 62.700 0, 0, 0, 13355424, 0, 62.700 0, 0, 0, 8854491, 3132640, 61.600 0, 0, 0, 0, 9302824, 59.000 0, 0, 0, 0, 9303561, 58.900 0, 0, 0, 0, 9313397, 59.000 0, 0, 0, 0, 9333944, 59.000 Test kernel: 94a976a cpuidle: New timer events oriented governor for tickless systems <<< V7 935be4e cpuidle: poll_state: Disregard disable idle states e3670df cpuidle: Add 'high' and 'low' idle state metrics dfa672c Documentation: admin-guide: PM: Add cpuidle document 2595646 Linux 4.20-rc5 Reference kernel: f418681 cpuidle: poll_state: Disregard disable idle states 1be0e87 cpuidle: Add 'high' and 'low' idle state metrics 279ec1d Documentation: admin-guide: PM: Add cpuidle document 2595646 Linux 4.20-rc5 ... Doug