From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbcBPBZ4 (ORCPT ); Mon, 15 Feb 2016 20:25:56 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:52279 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751726AbcBPBZy (ORCPT ); Mon, 15 Feb 2016 20:25:54 -0500 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: "Rafael J. Wysocki" , Guenter Roeck , "Rafael J. Wysocki" , linux-next@vger.kernel.org, Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" , Peter Zijlstra Subject: Re: Crashes in arm qemu emulations due to 'cpufreq: governor: Replace timers with utilization ...' Date: Tue, 16 Feb 2016 02:27:15 +0100 Message-ID: <6826860.yxabWEoz5T@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160216011335.GI6334@vireshk-i7> References: <20160215170527.GA24453@roeck-us.net> <20160216011335.GI6334@vireshk-i7> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, February 16, 2016 06:43:35 AM Viresh Kumar wrote: > On 15-02-16, 19:41, Rafael J. Wysocki wrote: > > On Mon, Feb 15, 2016 at 6:05 PM, Guenter Roeck wrote: > > > [ 1.340000] [] (__cpufreq_driver_target) from [] (dbs_check_cpu+0x1ac/0x1e8) > > > [ 1.340000] [] (dbs_check_cpu) from [] (cpufreq_governor_dbs+0x1fc/0x608) > > > [ 1.340000] [] (cpufreq_governor_dbs) from [] (__cpufreq_governor+0x1a8/0x204) > > > [ 1.340000] [] (__cpufreq_governor) from [] (cpufreq_init_policy+0x60/0x8c) > > > [ 1.340000] [] (cpufreq_init_policy) from [] (cpufreq_online+0x2e8/0x708) > > > [ 1.340000] [] (cpufreq_online) from [] (subsys_interface_register+0x80/0xc4) > > > [ 1.340000] [] (subsys_interface_register) from [] (cpufreq_register_driver+0x144/0x1a0) > > > > This is the registration of the cpufreq driver (cpufreq-dt in this case). > > > > It does cpufreq_online()->cpufreq_init_policy()->__cpufreq_governor()->cpufreq_governor_dbs()->dbs_check_cpu(). > > > > The only way that can happen is when cpufreq_set_policy() finds that > > the "old" and the "new" policies use the same governor, so it goes and > > calls __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS), but I'm not sure > > how this is possible during the initialization ATM. > > > > Viresh, any ideas? > > You misread probably. > > During init, policy->gov is NULL and new_policy->gov is set to the > default one, probably ondemand/conservative. And in that case, we do: > - INIT > - START > - LIMITS Yes, that's what we should be doing, but it seemed to me that we didn't. Or maybe the trace just contained the last one, because that's when the crash happened. Thanks, Rafael From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: Crashes in arm qemu emulations due to 'cpufreq: governor: Replace timers with utilization ...' Date: Tue, 16 Feb 2016 02:27:15 +0100 Message-ID: <6826860.yxabWEoz5T@vostro.rjw.lan> References: <20160215170527.GA24453@roeck-us.net> <20160216011335.GI6334@vireshk-i7> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from v094114.home.net.pl ([79.96.170.134]:52279 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751726AbcBPBZy (ORCPT ); Mon, 15 Feb 2016 20:25:54 -0500 In-Reply-To: <20160216011335.GI6334@vireshk-i7> Sender: linux-next-owner@vger.kernel.org List-ID: To: Viresh Kumar Cc: "Rafael J. Wysocki" , Guenter Roeck , "Rafael J. Wysocki" , linux-next@vger.kernel.org, Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" , Peter Zijlstra On Tuesday, February 16, 2016 06:43:35 AM Viresh Kumar wrote: > On 15-02-16, 19:41, Rafael J. Wysocki wrote: > > On Mon, Feb 15, 2016 at 6:05 PM, Guenter Roeck wrote: > > > [ 1.340000] [] (__cpufreq_driver_target) from [] (dbs_check_cpu+0x1ac/0x1e8) > > > [ 1.340000] [] (dbs_check_cpu) from [] (cpufreq_governor_dbs+0x1fc/0x608) > > > [ 1.340000] [] (cpufreq_governor_dbs) from [] (__cpufreq_governor+0x1a8/0x204) > > > [ 1.340000] [] (__cpufreq_governor) from [] (cpufreq_init_policy+0x60/0x8c) > > > [ 1.340000] [] (cpufreq_init_policy) from [] (cpufreq_online+0x2e8/0x708) > > > [ 1.340000] [] (cpufreq_online) from [] (subsys_interface_register+0x80/0xc4) > > > [ 1.340000] [] (subsys_interface_register) from [] (cpufreq_register_driver+0x144/0x1a0) > > > > This is the registration of the cpufreq driver (cpufreq-dt in this case). > > > > It does cpufreq_online()->cpufreq_init_policy()->__cpufreq_governor()->cpufreq_governor_dbs()->dbs_check_cpu(). > > > > The only way that can happen is when cpufreq_set_policy() finds that > > the "old" and the "new" policies use the same governor, so it goes and > > calls __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS), but I'm not sure > > how this is possible during the initialization ATM. > > > > Viresh, any ideas? > > You misread probably. > > During init, policy->gov is NULL and new_policy->gov is set to the > default one, probably ondemand/conservative. And in that case, we do: > - INIT > - START > - LIMITS Yes, that's what we should be doing, but it seemed to me that we didn't. Or maybe the trace just contained the last one, because that's when the crash happened. Thanks, Rafael From mboxrd@z Thu Jan 1 00:00:00 1970 From: rjw@rjwysocki.net (Rafael J. Wysocki) Date: Tue, 16 Feb 2016 02:27:15 +0100 Subject: Crashes in arm qemu emulations due to 'cpufreq: governor: Replace timers with utilization ...' In-Reply-To: <20160216011335.GI6334@vireshk-i7> References: <20160215170527.GA24453@roeck-us.net> <20160216011335.GI6334@vireshk-i7> Message-ID: <6826860.yxabWEoz5T@vostro.rjw.lan> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday, February 16, 2016 06:43:35 AM Viresh Kumar wrote: > On 15-02-16, 19:41, Rafael J. Wysocki wrote: > > On Mon, Feb 15, 2016 at 6:05 PM, Guenter Roeck wrote: > > > [ 1.340000] [] (__cpufreq_driver_target) from [] (dbs_check_cpu+0x1ac/0x1e8) > > > [ 1.340000] [] (dbs_check_cpu) from [] (cpufreq_governor_dbs+0x1fc/0x608) > > > [ 1.340000] [] (cpufreq_governor_dbs) from [] (__cpufreq_governor+0x1a8/0x204) > > > [ 1.340000] [] (__cpufreq_governor) from [] (cpufreq_init_policy+0x60/0x8c) > > > [ 1.340000] [] (cpufreq_init_policy) from [] (cpufreq_online+0x2e8/0x708) > > > [ 1.340000] [] (cpufreq_online) from [] (subsys_interface_register+0x80/0xc4) > > > [ 1.340000] [] (subsys_interface_register) from [] (cpufreq_register_driver+0x144/0x1a0) > > > > This is the registration of the cpufreq driver (cpufreq-dt in this case). > > > > It does cpufreq_online()->cpufreq_init_policy()->__cpufreq_governor()->cpufreq_governor_dbs()->dbs_check_cpu(). > > > > The only way that can happen is when cpufreq_set_policy() finds that > > the "old" and the "new" policies use the same governor, so it goes and > > calls __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS), but I'm not sure > > how this is possible during the initialization ATM. > > > > Viresh, any ideas? > > You misread probably. > > During init, policy->gov is NULL and new_policy->gov is set to the > default one, probably ondemand/conservative. And in that case, we do: > - INIT > - START > - LIMITS Yes, that's what we should be doing, but it seemed to me that we didn't. Or maybe the trace just contained the last one, because that's when the crash happened. Thanks, Rafael