From: Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
jinsong.liu@alibaba-inc.com,
Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>,
jacob.shin@amd.com, Tim Deegan <tim@xen.org>,
Jan Beulich <jbeulich@suse.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: cpufreq implementation for OMAP under xen hypervisor.
Date: Tue, 2 Sep 2014 18:43:41 +0300 [thread overview]
Message-ID: <CAH_mUMNDbKoTJHRnKRM-En0q4uoNUtt2Upp4ESQRhgZOTtQ6mQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1409020154160.20817@kaball.uk.xensource.com>
On Tue, Sep 2, 2014 at 4:00 AM, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Fri, 29 Aug 2014, Andrii Tseglytskyi wrote:
>> Hi,
>>
>> Stefano, Ian,
>>
>> Could you please clarify the following point:
>>
>> I agree that decision about frequency change should be taken by Xen
>> hypervisor. But what about hardware frequency changing?
>> In general when frequency changed to bigger value (for example from 1
>> GHz to 1.5 GHz) for ARM kernels sequence looks like the following:
>>
>> 1) cpufreq governor decides that frequency should be changed. This
>> decision is taken after analysing of CPU performance data taking in
>> account governor policy.
>> 2) cpufreq governor asks cpufreq driver about new frequency.
>> 3) cpufreq driver compares current and target frequencies and asks
>> cpufreq regulator about voltage change.
>> 4) cpufreq regulator send i2c command to standalone microchip, which
>> is responsible for voltage changing.
>> 5) cpufreq driver asks clock framework about new frequency for CPU clock
>> 6) clock framework performs frequency sanity checks, taking in account
>> clock parents and clock divider settings, and call platform specific
>> "set_frequency" callback.
>> 7) platform specific callback performs proper HW registers
>> configuration for newly selected frequency
>>
>> Also there are some special cases - for example for OMAP5+ when
>> frequency is changed to 1.5 GHz+, two additional HW IPs should be
>> triggered (ABB and DCC, if someone is familiar with OMAP5+ )
>>
>> So, for generic ARM kernel we have 3 entities to change frequency:
>>
>> - cpufreq governor
>> - cpufreq driver
>> - cpufreq regulator
>>
>> + 2 additional IP for OMAP5+
>> - ABB
>> - DCC
>>
>> Taking in account all above, it looks like it would be better to
>> implement only Xen cpufreq governor. Xen will take a decision about
>> new frequency, and kernel dom0 will perform other steps. Dom0 contains
>> all generic and platform specific frameworks, needed for frequency
>> changing.
>>
>> What do you think ?
>
> Keep in mind that the architecture must be able to handle the case where
> dom0 has only 1 or 2 vcpus on a 4 or 8 cores system with multiple
> physical cpus.
> Could dom0 change the frequency of a physical core or a physical cpu is
> not even running on? If that is not a problem, because cpus and
> frequency changing are decoupled enough in Linux to allow it, then I am
> OK with it. But I suspect they are not.
>
Not sure that I got your point correctly - dom0 will change frequency
on physical CPU.
And in case of OMAP - this changing affects on both ARM physical cpus
- changing is coupled.
In case of other ARM platforms - changing may be not coupled (I've
heard that Snapdragon can change cpu freqs independently on each
physical cpu)
Regrads,
Andrii
--
Andrii Tseglytskyi | Embedded Dev
GlobalLogic
www.globallogic.com
next prev parent reply other threads:[~2014-09-02 15:43 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 10:57 cpufreq implementation for OMAP under xen hypervisor Oleksandr Dmytryshyn
2014-08-12 12:15 ` Stefano Stabellini
2014-08-12 12:19 ` Oleksandr Dmytryshyn
2014-08-19 14:02 ` Vitaly V. Ch
2014-08-21 23:05 ` Stefano Stabellini
2014-08-22 14:21 ` Vitaly Chernooky
2014-08-22 16:20 ` Stefano Stabellini
2014-08-21 11:00 ` Oleksandr Dmytryshyn
2014-08-21 23:31 ` Stefano Stabellini
2014-08-22 9:02 ` Oleksandr Dmytryshyn
2014-08-22 16:31 ` Stefano Stabellini
2014-08-22 16:51 ` Ian Campbell
2014-08-29 13:25 ` Oleksandr Dmytryshyn
2014-08-29 15:08 ` Andrii Tseglytskyi
2014-09-02 1:00 ` Stefano Stabellini
2014-09-02 9:06 ` Vitaly Chernooky
2014-09-02 15:43 ` Andrii Tseglytskyi [this message]
2014-09-02 18:39 ` Stefano Stabellini
2014-09-02 18:46 ` Andrii Tseglytskyi
2014-09-04 14:43 ` Oleksandr Dmytryshyn
2014-09-04 21:56 ` Stefano Stabellini
2014-09-09 10:19 ` Oleksandr Dmytryshyn
2014-09-09 21:52 ` Stefano Stabellini
2014-09-09 10:32 ` Ian Campbell
2014-09-09 21:41 ` Stefano Stabellini
2014-09-10 9:42 ` Ian Campbell
2014-09-10 10:19 ` Andrii Tseglytskyi
2014-09-10 18:35 ` Stefano Stabellini
2014-09-10 19:31 ` Konrad Rzeszutek Wilk
2014-09-16 13:49 ` Oleksandr Dmytryshyn
2014-09-17 17:06 ` Konrad Rzeszutek Wilk
2014-09-18 9:38 ` Oleksandr Dmytryshyn
2014-09-18 14:59 ` Konrad Rzeszutek Wilk
2014-09-19 9:38 ` Oleksandr Dmytryshyn
2014-09-24 14:36 ` Stefano Stabellini
2014-09-24 14:46 ` Konrad Rzeszutek Wilk
2014-09-25 9:13 ` Oleksandr Dmytryshyn
2014-09-25 9:08 ` Oleksandr Dmytryshyn
2014-09-25 10:14 ` Stefano Stabellini
2014-09-25 11:15 ` Oleksandr Dmytryshyn
2014-09-26 18:13 ` Konrad Rzeszutek Wilk
2014-09-29 9:45 ` Oleksandr Dmytryshyn
2014-09-29 15:18 ` Konrad Rzeszutek Wilk
2014-09-30 10:28 ` Oleksandr Dmytryshyn
2014-09-30 17:37 ` Konrad Rzeszutek Wilk
2014-09-11 9:43 ` Ian Campbell
2014-09-09 13:25 ` Vitaly Chernooky
2014-09-09 21:58 ` Stefano Stabellini
2014-09-10 10:15 ` Andrii Tseglytskyi
2014-09-10 10:24 ` Vitaly Chernooky
2014-09-10 11:18 ` Andrii Tseglytskyi
2014-09-10 18:37 ` Stefano Stabellini
2014-09-11 7:51 ` Vitaly Chernooky
2014-09-10 11:24 ` Vitaly Chernooky
2014-09-10 14:28 ` Vitaly Chernooky
2014-09-10 18:41 ` Stefano Stabellini
2014-09-11 7:48 ` Vitaly Chernooky
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=CAH_mUMNDbKoTJHRnKRM-En0q4uoNUtt2Upp4ESQRhgZOTtQ6mQ@mail.gmail.com \
--to=andrii.tseglytskyi@globallogic.com \
--cc=Ian.Campbell@citrix.com \
--cc=jacob.shin@amd.com \
--cc=jbeulich@suse.com \
--cc=jinsong.liu@alibaba-inc.com \
--cc=oleksandr.dmytryshyn@globallogic.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).