From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.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>,
Tim Deegan <tim@xen.org>, xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <jbeulich@suse.com>,
jacob.shin@amd.com,
Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>
Subject: Re: cpufreq implementation for OMAP under xen hypervisor.
Date: Wed, 10 Sep 2014 15:31:49 -0400 [thread overview]
Message-ID: <20140910193149.GB2898@laptop.dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1409101928370.8137@kaball.uk.xensource.com>
On Wed, Sep 10, 2014 at 07:35:47PM +0100, Stefano Stabellini wrote:
> On Wed, 10 Sep 2014, Andrii Tseglytskyi wrote:
> > Hi,
> >
> > On Wed, Sep 10, 2014 at 12:42 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > >
> > > On Tue, 2014-09-09 at 22:41 +0100, Stefano Stabellini wrote:
> > > > On Tue, 9 Sep 2014, Ian Campbell wrote:
> > > > > On Thu, 2014-09-04 at 22:56 +0100, Stefano Stabellini wrote:
> > > > > > I am trying to think of an alternative, such as passing the real cpu
> > > > > > nodes to dom0 but then adding status = "disabled", but I am not sure
> > > > > > whether Linux checks the status for cpu nodes.
> > > > >
> > > > > status = "disabled" is defined to have a specific (i.e. non-default)
> > > > > meaning for cpu nodes, Julien mentioned this when I tried to add a
> > > > > similar patch to Xen to ignore them. I think it basically means "present
> > > > > but not running, you should start them!".
> > > > >
> > > > > > In addition this scheme
> > > > > > wouldn't support the case where dom0 has more vcpus than pcpus on the
> > > > > > system. Granted it is not very common and might even be detrimental for
> > > > > > performances, but we should be able to support it.
> > > > >
> > > > > It's a bit of an edge case, for sure. I guess it wouldn't be totally
> > > > > unreasonable to say that if you use this sort of configuration you may
> > > > > not get cpufreq support.
> > > > >
> > > > > > Ian, what do you think about this?
> > > > >
> > > > > All the options suck in one way or another AFAICT. I think we are going
> > > > > to be looking for the least bad solution not necessarily a good one.
> > > > >
> > > > > Fundamentally are we trying to avoid having to have a i2c subsystem etc
> > > > > in the hypervisor to be be able to change the voltages before/after
> > > > > changing the frequency?
> > > > >
> > > > > We can't just say "that's part of the cpufreq driver" since different
> > > > > boards using the same SoC might use different voltage regulators, over
> > > > > i2c or some other bus etc, so we end up with a matrix.
> > > > >
> > > > > It's arguable that we should be letting dom0 poke at that regulator
> > > > > functionality anyway, at least not all of it. Taking that ability away
> > > > > would necessarily imply more platform specific functionality in the
> > > > > hypervisor.
> > > >
> > > > Right.
> > > > I am afraid that in order to avoid more code in Xen, we end up with an
> > > > unmaintainable interface and unupstreamable hacks in dom0.
> > >
> > > That's what I'm worried about to. Hence I'm wondering if we should just
> > > do this in the hypervisor.
> > >
> > > Although there are a myriad of them the parts used to do voltage control
> > > tend to be fairly simple.
> > >
> > > One concern I have is that i2c busses also tend to have other things on
> > > them which dom0 might legitimately access (e.g. rtc), I'm not sure what
> > > to suggest here.
> >
> > I would try to avoid i2c transactions in Xen. I2C driver is quite
> > complicated in Linux kernel. It consists of several parts - common
> > core + platform specific. I'm pretty sure Xen should not handle this.
> > I think that establishing of event channel for frequency changing is a
> > good idea. It would be good to try to implement this. In process of
> > implementation we will see what is need to be resolved.
>
> OK, that's reasonable.
>
>
> > The only question here is how to pass physical cpu to dom0.
>
> We can use a device tree based interface to pass the information to
> dom0, but requiring a number of dom0 vcpus equal to the number of
> physical cpus and in addition to that having to pin the vcpus each to a
> different pcpu is quite a stringent limitation. However I don't know the
> frequency changing interfaces in Linux well enough to know how hard
> would be to lift it.
>
>
> > Regarding x86.
> > I'm not sure but maybe ACPI interface encapsulate voltage changing as well?
>
> I think so (but I am not an expert on that).
The usual states are P and C states. The P states is the closes to what you
are looking at:
struct acpi_processor_px {
u64 core_frequency; /* megahertz */
u64 power; /* milliWatts */
u64 transition_latency; /* microseconds */
u64 bus_master_latency; /* microseconds */
u64 control; /* control value */
u64 status; /* success indicator */
};
>
>
>
> > Regards,
> > Andrii
> >
> >
> > --
> >
> > Andrii Tseglytskyi | Embedded Dev
> > GlobalLogic
> > www.globallogic.com
> >
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-09-10 19:31 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
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 [this message]
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=20140910193149.GB2898@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=andrii.tseglytskyi@globallogic.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 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.