Received: by 10.213.65.68 with SMTP id h4csp831702imn; Wed, 28 Mar 2018 13:42:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+en6WCriO3mE073drl1yg41GKKUpyUs34IlFekGiQa7MEtyG+cuJyu46IKVkcP+/2zgGAf X-Received: by 10.98.178.20 with SMTP id x20mr4200000pfe.32.1522269766417; Wed, 28 Mar 2018 13:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522269766; cv=none; d=google.com; s=arc-20160816; b=oUjkqAlGyVcN04wVIY+LqYKiSq7hsu+a6GPBdFWXIduzpWyfS5y24t1oPgbdo8wNva 74C4RQnIaC1gQh93SBdJsB8+R/usm/756SnEMApv6r3L6y7FsiSFvUbVB5Kl9dkNGoGB byWDMOtSz067ABNygbX3tuQjcK108JeoMLzmaMVNsdAEqOYBTLnok03ph0zFRVC0EnhK jK+CF1xXd5HNqsBQ/Q8IMLxhwlRBPCGBz5HW1zCdsfeMzvBzbNhci1pYM+cWPVgyXDWr DTP8qE8G/TLirjcGzSF/oD0mfG5Yw7UKM0ksQNh2m9zNOXQdDIggdqNl3Win+4Ua2kt/ DDNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:content-language :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature :arc-authentication-results; bh=mW0glB8BTnSAt4kVNCEdbVIwXO2p8KDRl86ehLZhYA0=; b=Vwo7HanKl6y/bH5ddYm04oABRvTUGAUpHeffscTRjbnkAy8imTzxmK73P9/uXahcAY cFYaO7ujFcmpmkrsLLqqrFq+hMEZij8gMdNv/1zzfcU6OmXMUTjGQM4oPKVwSauYZn4f 2yp7rBX25dM7P9PUVwu/mk+Gz+7odSFIRx4qSALWX955Sht+WwRBSlBUgo3gmSv8KgF6 YjTlBHqy3l3SYOamPzTNuvgX0ygHSjCxSUE0aLA7dHdi1viYONL8gK10H2sw6XcRrLwy IIYAXbc5zN15+axVnO/HehV7TBfBDlrB1qDDGM7oAHCKy91/HRQ1BrxshqJ80Wt1iOM6 f69w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@telus.net header.s=neo header.b=0fFEcZit; 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 c13-v6si4447335plz.564.2018.03.28.13.42.32; Wed, 28 Mar 2018 13:42:46 -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=pass (test mode) header.i=@telus.net header.s=neo header.b=0fFEcZit; 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 S1752936AbeC1Ulp (ORCPT + 99 others); Wed, 28 Mar 2018 16:41:45 -0400 Received: from cmta17.telus.net ([209.171.16.90]:49280 "EHLO cmta17.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753098AbeC1Uln (ORCPT ); Wed, 28 Mar 2018 16:41:43 -0400 Received: from dougxps ([173.180.45.4]) by cmsmtp with SMTP id 1Ht2ftEr34xyu1Ht3fiwPG; Wed, 28 Mar 2018 14:41:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1522269702; bh=mW0glB8BTnSAt4kVNCEdbVIwXO2p8KDRl86ehLZhYA0=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=0fFEcZitvxPmXjWNLjsC79oJsga7IYAASHb08LC2TTXax/A52nCmhG2/8TEQxv4W4 IGLkLTQZzhbL8yL7XCm53k1yP+zA/8QA+Epv03pAAr4XEmTKeezOMEDfY41jgP/8xc 0WbX9xCenjyXRy0xdZmAid6NAxqfy3ncpkj+vVHZ41HWZXn1GgxD9NKcZfJp3SAH8F ebc2zeD4kTY8cdrQiWdjh7quawTNvNxGAraK6JyR545Ngfu17ESZ/IzyhxavBWe3AN qA8B3YYF7WDJ3adzqCcZ6SFQuQZzEEC6Nl3/G/SZryLmmFRAXKmS09DOBshGlp3VRE uVicMzMclahAQ== X-Authority-Analysis: v=2.2 cv=StJ/0LG0 c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=IkcTkHD0fZMA:10 a=VwQbUJbxAAAA:8 a=KkEDkbTihyXXKOALizMA:9 a=hSVDg7MSulAM0z_m:21 a=74SgL-Vdwuyptwju:21 a=QEXdDO2ut3YA:10 a=AjGcO6oz07-iQ99wixmX:22 From: "Doug Smythies" To: "'Thomas Ilsche'" , "'Rafael J. Wysocki'" Cc: "'Peter Zijlstra'" , "'Linux PM'" , "'Frederic Weisbecker'" , "'Thomas Gleixner'" , "'Paul McKenney'" , "'Rik van Riel'" , "'Aubrey Li'" , "'Mike Galbraith'" , "'LKML'" , "Doug Smythies" References: <2390019.oHdSGtR3EE@aspire.rjw.lan> <2249320.0Z4q8AXauv@aspire.rjw.lan> <6462e44a-e207-6b97-22bf-ad4aed69afc2@tu-dresden.de> <4198010.6ArFqS34NK@aspire.rjw.lan> 1CoHfInOKlebY1CoMfMNTB In-Reply-To: 1CoHfInOKlebY1CoMfMNTB Subject: RE: [RFT][PATCH v7 6/8] sched: idle: Select idle state before stopping the tick Date: Wed, 28 Mar 2018 13:41:35 -0700 Message-ID: <006501d3c6d5$2d03e500$870baf00$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-ca Thread-Index: AdPGp8AuCNNN9oq0S1KJzh3LS5ugtAAKzJ1Q X-CMAE-Envelope: MS4wfGEbGNuPaMaUmgUeNtThBuAiMCeO/ILnWcQjN6n5eGCps5UcJ8lUjqHfpmP+7q23erVs31zPkUVhsBEFT03e7AffUXKTlhRQDk5gh7XEWXQEOb7+0G8H Ru+lF+J6xr6jiura2uwf3DDC3xQLWJhb7FLTq10RvdHDYcn6V6dgqpHcw4qPdZqgucqrg6+0NZQ/mspmRvIcsOxHuaFxCXYtjGZITHjDdg7TMTabA8IVHm1g s3WgyTf85lPjNLhQIzs940uHUr8SppNMcG9PQ18sxVFzRQmJJpGUjXdZfnA9b8Kmq3oYxMNw1Ny7nBtlANUdgB77bJdCmj/Xgqa33NIuMRaXvT+vZjrW5i30 PPLil2+2aTuRkR1f8CAOcgNHF0fgJ4puBKaqWa/87Z4dE8qmhgK6GuMkJ4q/qJIkbHhY304b5Pp/ecbYVwQdIBHt08dBEFyRNDaQ3C6ZGj0BOYHlLUJOI0hh HC5MVA9NDxAz/C/1W56ay8pKTLJcomJJ69mnJChrVzNrbLXH2h6TPesZW1Q= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018.03.28 08:15 Thomas Ilsche wrote: > On 2018-03-28 12:56, Rafael J. Wysocki wrote: >> On Wed, Mar 28, 2018 at 12:37 PM, Rafael J. Wysocki wrote: >>> On Wed, Mar 28, 2018 at 10:38 AM, Thomas Ilsche >>> wrote: >>>> On 2018-03-28 10:13, Rafael J. Wysocki wrote: >>>>> >> >> [cut] >> >>> >>> So I do >>> >>> $ for cpu in 0 1 2 3; do taskset -c $cpu sh -c 'while true; do usleep >>> 500; done' & done >>> >>> which is a shell kind of imitation of the above and I cannot see this >>> issue at all. >>> >>> I count the number of times data->next_timer_us in menu_select() is >>> greater than TICK_USEC and while this "workload" is running, that >>> number is exactly 0. >>> >>> I'll try with a C program still. >> >> And with a C program I see data->next_timer_us greater than TICK_USEC >> while it is running, so let me dig deeper. >> > > I can confirm that a shell-loop behaves differently like you describe. > Even if it's just a shell-loop calling "main{usleep(500);}" binary. I normally use the C program method. The timer there returns with the need_sched() flag set. I do not seem to have usleep on my system, but when using sleep in a shell loop, the timer returns without the need_resched() flag set. Most of my test results involving varying the value of POLL_IDLE_COUNT are total garbage, because I was using the C program method, and thus exiting the poll_idle loop based on the need_resched() flag and not the POLL_IDLE_COUNT setting. I don't know if I can re-do the work, because I do not have a good way to get my system to use Idle State 0 with any real workflow, and I seem to get into side effect issues when I disable other idle states to force more use of idle state 0. ... Doug