Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752797AbeAEUhk (ORCPT + 1 other); Fri, 5 Jan 2018 15:37:40 -0500 Received: from mail-by2nam03on0078.outbound.protection.outlook.com ([104.47.42.78]:39590 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751537AbeAEUhh (ORCPT ); Fri, 5 Jan 2018 15:37:37 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Message-ID: <1515184652.6892.26.camel@nxp.com> Subject: [BUG] schedutil governor produces regular max freq spikes because of lockup detector watchdog threads From: Leonard Crestez To: , Viresh Kumar , "Rafael J. Wysocki" , Steve Muckle CC: Anson Huang , "linux-kernel@vger.kernel.org" Date: Fri, 5 Jan 2018 22:37:32 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131596582286073151;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39380400002)(376002)(39860400002)(396003)(346002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(6306002)(50466002)(4326008)(50226002)(23676004)(97736004)(86362001)(59450400001)(53936002)(8936002)(81156014)(106466001)(2870700001)(8676002)(68736007)(966005)(103116003)(105606002)(81166006)(498600001)(305945005)(956003)(47776003)(356003)(2906002)(104016004)(8656006)(316002)(5660300001)(5820100001)(85426001)(36756003)(110136005)(54906003)(99106002)(42866002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB2362;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC003;1:vaGdVe0631IEE+Cu3Uv84XHqRub2CvmUiXxd+emqK0GiMYy92FJWZUTLnMMolp3A/nYmcCpjxHRBY/Kwl3dnCarMRYqVJPJlQypO1z5jpygK7AULekI4kZKM7WFMAzo1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23a19378-0a19-477d-1d3f-08d5547c1748 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307);SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2362;3:/zFCGceZBlhFCoVWepoGgHlldGZZ3hF+WpcU2rgu3UnMjGiBQih6DDTAL2H/wYYbcei8ud40161nnNKx/8bH2KrkZTnGDT3TKCSvhjfAPZaN+1QUodQMbjHdSsNgnfBMv8T5jQSdqFmDJwB95Wt1QFCDJxUWih7Mpokh+hl1De5HLJstIYoH94DqnkjOGXXXGxFEJPqO+IfUO301TjnchGmQwvA9xYAR7tggemRXbnWk2/i/YTGFvBQDQ+XfHOqGBuUhTClaOKQAbuzIgwf+keYz2R5taU/FmJ5YrCFnlnKcV7/90g/0BSD8BhPvRb1EBacElC4zkjaS5V2Aoa6SNhZMjNX+nLLjw5OaeDzGXP0=;25:EisbWnDX80ANOJYYbGf6IS3HlynkSpwfLypN+LyoesBamOBNz6RjHcoT54xiLsRK+NIgbVes82qbdQTOwOHsJ/s14LV8HURdsUPkIvtmgmRIHn8etFeKYrjI0tdDVP/oH8Y6WZVvpHgebbU9G1caQWJavH2KrZuukpZAf68LlF4FPRhfsqAsoGumVrenCRECIAC595ut1FXUrvy45dBwT5efUn4zHBT1JL3KBHUNCE1HS4+MWDFPP105A5zve3+CebicGIP9tbYtNPAuUU1w1NybAFegJbExI0Mm3CYZidsedDWgsSuAPf6HFrVMq4HxtFs8Mj8H/Zpf1OiRzWIu2A== X-MS-TrafficTypeDiagnostic: CY1PR03MB2362: X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2362;31:70dx74BDogZgJroPxZb5oabS+2BeFhx5kFvLVDwxh0LVUaUKTshUN5yj/TZ7aN1JRRWNT3hA7SAwVQ+i3IFTv/ZxRxjMgUCuF2zeFE2GkjznWFHNLKVYfocmViqybPDZlHV5hUMOikcqSLZE9AyilvdER++/rwVoCwFsvNnQQCikLqwdkdnxntPLGjOfizs3NiUh0M/LvEgM2maCCbGc4HhBaXRNsI2w1iNoEmxaVLs=;4:GCuuJkZf8dNF47aLsqZooBdn88wsP6cea7AmAYoe6w2rvcTiBtlns47WDf7Jn6Tt9g1F7qInpfNInj8V1NOHHIfVpo11R89QBL4VaI31HbQsapkCiVYsSwOwXHaEjsehzfrIrubcJhU+M0pzV+Sla6hygwM5RUxOKrQvHWWqjCbOf8GyYXAaq78L0pTaULXGs3vHtwJbw15z6G06Bx6eqt6zB8uS5CE1xGDcHdxW1SvUu7+SJNvD+/JVjwvJcWoqs5LbOdOeFUS/Bb60++4xFA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(944510075)(944921075)(946801075)(946901075)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011);SRVR:CY1PR03MB2362;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:CY1PR03MB2362; X-Forefront-PRVS: 05437568AA X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAzTUIyMzYyOzIzOlFHZWhCL2lxNFNPS3ZrU25IdFVNOG9BL1pK?= =?utf-8?B?dUJBWVpReEZXODJUelpGRGd1SkxFdFJDQ3hBWWZaMWpqRTFmYjRIVlZQWTRw?= =?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5pdJR2GvuX4SbUhwhQbdlYNeZfT5U1zRXgAdqTgtv0UMG3CjPf5hGdFokEkAhgeIKoGBZuAk82n9EpzMhxNdD1R7yeok45siEOCH2Fp+M1Gg7gu/RE9NfLoin3QcW3XefdXQ6wI=;24:KJOf/7dZiLpawwq/dX6xj+E+IRLxbZElKlP+bwR+ooTLH/8ZloetGHq3J3XB4N/E3v2cJHRcztxjYQcyajgnW3Q/paH7+WdW9K6N7hRTxoc=;7:tCCVQz/HR+61UFz3XFqIsvzHEqe9nLGaWq0WJUvcgTNGkqv+ync3FUTEydaPNz0n6LGH2GWYNrDBuDe8AgncHuAS2/SOK7BSbf3Vq8BJrcnJU48fvBXnFK4gnAZM7JZZ53H7W7pAAULIh5O+5fC4ccrY9HNPE0WGPUq41saK09QStZy9rb+YpgS38mLaf6jE3/o8+K6ZJ12HoWsoP+vH4quxWItahOs/Jwqk6yQ4UI0TKTQgPBl1R0aeC+HIQeQQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 20:37:08.4513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23a19378-0a19-477d-1d3f-08d5547c1748 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2362 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello, When using the schedutil governor together with the softlockup detector all CPUs go to their maximum frequency on a regular basis. This seems to be because the watchdog creates a RT thread on each CPU and this causes regular kicks with:     cpufreq_update_this_cpu(rq, SCHED_CPUFREQ_RT); The schedutil governor responds to this by immediately setting the maximum cpu frequency, this is very undesirable. The issue can be fixed by this patch from android:     https://patchwork.kernel.org/patch/9301909/ The patch stalled in a long discussion about how it's difficult for cpufreq to deal with RT and how some RT users might just disable cpufreq. It is indeed hard but if the system experiences regular power kicks from a common debug feature they will end up disabling schedutil instead. No other governors behave this way, perhaps the current behavior should be considered a bug in schedutil. That patch now has conflicts with latest upstream. Perhaps a modified variant should be reconsidered for inclusion, or is there some other solution pending? Alternatively the watchdog threads could be somehow marked as to never cause increased cpufreq. -- Regards, Leonard