From: Viresh Kumar <viresh.kumar@linaro.org> To: Mason <slash.tmp@free.fr> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>, Daniel Lezcano <daniel.lezcano@linaro.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Mans Rullgard <mans@mansr.com>, Linux ARM <linux-arm-kernel@lists.infradead.org>, Linux PM <linux-pm@vger.kernel.org>, cpufreq <cpufreq@vger.kernel.org> Subject: Re: schedule_timeout sleeps too long after dividing CPU frequency Date: Fri, 15 May 2015 09:46:32 +0530 [thread overview] Message-ID: <20150515041632.GG6348@linux> (raw) In-Reply-To: <5554B5C1.2070402@free.fr> On 14-05-15, 16:48, Mason wrote: > I don't know. Is it not obvious (to someone who knows what to > look for) from reading the smp_twd.c source? > > How do I run the TWD in one-shot mode? I haven't refreshed my memory for the earlier reply, but I have tried to go through the code again. The logic is this: - Oneshot mode is only useful if we are going to support NO_HZ mode. i.e. we can disable the clkevt device during CPU idle .. - For that to work, or in other words for the CPU to wake up from the idle state, we need a broadcast timer. Which will wake up the idle cpu and its clkevt device. You don't have this 'broadcast' timer in your case and so we aren't able to switch to oneshot mode. Even if you do that, you will be stuck in LOW resolution mode. And so you probably leave this timer as is and use a out-of-CPU-domain timer for this work, which can support high resolution mode. > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0407g/CIHGECHJ.html What core does your platform has? Cortex A9? Doesn't that uses this timer instead: drivers/clocksource/arm_arch_timer.c ? > "The global timer is clocked by PERIPHCLK." > > PERIPHCLK = CPUCLK/2 > > Change the CPUCLK, change the PERIPHCLK. I am not sure if GPT on SPEAr was an ARM provided timer. But it definitely doesn't depend on cpu-clk and so no cpufreq support in that. > > The same timer is probably used for SPEAr (the platform > > I used to work on): > > > > http://lxr.free-electrons.com/source/arch/arm/mach-spear/time.c?v=3.14 > > Did that platform use cpufreq DFS? Yes, but the clock to that timer was independent of CPU's clock. -- viresh
WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar) To: linux-arm-kernel@lists.infradead.org Subject: schedule_timeout sleeps too long after dividing CPU frequency Date: Fri, 15 May 2015 09:46:32 +0530 [thread overview] Message-ID: <20150515041632.GG6348@linux> (raw) In-Reply-To: <5554B5C1.2070402@free.fr> On 14-05-15, 16:48, Mason wrote: > I don't know. Is it not obvious (to someone who knows what to > look for) from reading the smp_twd.c source? > > How do I run the TWD in one-shot mode? I haven't refreshed my memory for the earlier reply, but I have tried to go through the code again. The logic is this: - Oneshot mode is only useful if we are going to support NO_HZ mode. i.e. we can disable the clkevt device during CPU idle .. - For that to work, or in other words for the CPU to wake up from the idle state, we need a broadcast timer. Which will wake up the idle cpu and its clkevt device. You don't have this 'broadcast' timer in your case and so we aren't able to switch to oneshot mode. Even if you do that, you will be stuck in LOW resolution mode. And so you probably leave this timer as is and use a out-of-CPU-domain timer for this work, which can support high resolution mode. > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0407g/CIHGECHJ.html What core does your platform has? Cortex A9? Doesn't that uses this timer instead: drivers/clocksource/arm_arch_timer.c ? > "The global timer is clocked by PERIPHCLK." > > PERIPHCLK = CPUCLK/2 > > Change the CPUCLK, change the PERIPHCLK. I am not sure if GPT on SPEAr was an ARM provided timer. But it definitely doesn't depend on cpu-clk and so no cpufreq support in that. > > The same timer is probably used for SPEAr (the platform > > I used to work on): > > > > http://lxr.free-electrons.com/source/arch/arm/mach-spear/time.c?v=3.14 > > Did that platform use cpufreq DFS? Yes, but the clock to that timer was independent of CPU's clock. -- viresh
next prev parent reply other threads:[~2015-05-15 4:16 UTC|newest] Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-12 14:32 schedule_timeout sleeps too long after dividing CPU frequency Mason 2015-05-12 14:32 ` Mason 2015-05-12 14:46 ` Viresh Kumar 2015-05-12 14:46 ` Viresh Kumar 2015-05-12 15:14 ` Mason 2015-05-12 15:14 ` Mason 2015-05-12 15:50 ` Russell King - ARM Linux 2015-05-12 15:50 ` Russell King - ARM Linux 2015-05-12 16:14 ` Mason 2015-05-12 16:14 ` Mason 2015-05-13 16:51 ` Mason 2015-05-13 16:51 ` Mason 2015-05-14 2:13 ` Viresh Kumar 2015-05-14 2:13 ` Viresh Kumar 2015-05-14 11:22 ` Mason 2015-05-14 11:22 ` Mason 2015-05-14 11:54 ` Viresh Kumar 2015-05-14 11:54 ` Viresh Kumar 2015-05-14 13:06 ` Mason 2015-05-14 13:06 ` Mason 2015-05-14 13:53 ` Russell King - ARM Linux 2015-05-14 13:53 ` Russell King - ARM Linux 2015-05-14 14:51 ` Mason 2015-05-14 14:51 ` Mason 2015-05-14 13:59 ` Viresh Kumar 2015-05-14 13:59 ` Viresh Kumar 2015-05-14 13:59 ` Viresh Kumar 2015-05-14 14:38 ` Viresh Kumar 2015-05-14 14:38 ` Viresh Kumar 2015-05-14 14:42 ` Russell King - ARM Linux 2015-05-14 14:42 ` Russell King - ARM Linux 2015-05-15 9:29 ` Mason 2015-05-15 9:29 ` Mason 2015-05-15 9:51 ` Russell King - ARM Linux 2015-05-15 9:51 ` Russell King - ARM Linux 2015-05-15 10:01 ` Viresh Kumar 2015-05-15 10:01 ` Viresh Kumar 2015-05-15 10:36 ` Mason 2015-05-15 10:36 ` Mason 2015-05-15 11:58 ` Russell King - ARM Linux 2015-05-15 11:58 ` Russell King - ARM Linux 2015-05-15 12:45 ` Mason 2015-05-15 12:45 ` Mason 2015-05-15 13:15 ` Russell King - ARM Linux 2015-05-15 13:15 ` Russell King - ARM Linux 2015-05-15 13:58 ` Mason 2015-05-15 18:35 ` Mason 2015-05-18 11:24 ` Mason 2015-05-18 11:54 ` Russell King - ARM Linux 2015-05-20 16:21 ` Mason 2015-05-20 18:50 ` Arnd Bergmann 2015-05-20 19:34 ` Mason 2015-05-20 20:14 ` Russell King - ARM Linux 2015-05-20 20:41 ` Mason 2015-05-20 20:52 ` Arnd Bergmann 2015-05-20 21:56 ` Mason 2015-05-20 22:18 ` Arnd Bergmann 2015-05-21 12:35 ` Mason 2015-05-20 23:14 ` Russell King - ARM Linux 2015-05-21 9:56 ` Mason 2015-05-21 10:20 ` Russell King - ARM Linux 2015-05-14 14:48 ` Mason 2015-05-14 14:48 ` Mason 2015-05-15 4:16 ` Viresh Kumar [this message] 2015-05-15 4:16 ` Viresh Kumar 2015-05-15 5:07 ` Viresh Kumar 2015-05-15 5:07 ` Viresh Kumar 2015-05-15 9:00 ` Russell King - ARM Linux 2015-05-15 9:00 ` Russell King - ARM Linux 2015-05-15 9:21 ` Mason 2015-05-15 9:21 ` Mason 2015-05-15 10:11 ` Mason 2015-05-15 10:11 ` Mason 2015-05-12 15:23 ` Russell King - ARM Linux 2015-05-12 15:23 ` Russell King - ARM Linux 2015-05-12 16:03 ` Mason 2015-05-12 16:03 ` Mason
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150515041632.GG6348@linux \ --to=viresh.kumar@linaro.org \ --cc=cpufreq@vger.kernel.org \ --cc=daniel.lezcano@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=mans@mansr.com \ --cc=rjw@rjwysocki.net \ --cc=slash.tmp@free.fr \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.