[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v3 0/8] xen_cpufreq implementation in kernel



On Sun, Oct 26, 2014 at 7:38 PM, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
>
> On Thu, 23 Oct 2014, Oleksandr Dmytryshyn wrote:
> > Hi to all.
> >
> > Next series of patches implements xen-cpufreq driver in kernel.
> >
> > Cpufreq core and registered cpufreq governors are located in xen. Dom0 has 
> > CPU
> > driver which can only change frequency of the physical CPUs. In addition 
> > this
> > driver can change CPUs regulator voltage. At start time xen-cpufreq driver
> > in kernel uploads to Xen information about physical cpus.
> > Xen notifies Dom0 kernel using VIRQ_CPUFREQ interrupt. Then xen-cpufreq 
> > driver
> > in kernel uses XEN_SYSCTL_cpufreq_op operation from HYPERVISOR_sysctl 
> > hypercall
> > to get some parameters from Xen (frequency, relation and cpu number).
> > Then xen-cpufreq changes frequency on physical cpu and uses the same
> > XEN_SYSCTL_cpufreq_op operation ti give the result to Xen.
>
> This doesn't seem to be very efficient: many hypercalls for a single
> operation. I think it would be best to come up with an interface that
> doesn't require so many back and forth. Maybe we could have a shared
> struct somewhere in memory for Xen to export information.
>
> BTW we are still waiting for benchmarks :-)
I'll try to start benchmarks a bit later.

>
> > Next configs should be enabled to use xen-cpufreq driver:
> > CONFIG_GENERIC_CPUFREQ_CPU0
> > CONFIG_XEN_CPUFREQ
> >
> > Changed since v1:
> >  * added cpufreq_drv_ops which allows to use more than one high-level
> >    cpufreq driver
> >  * reworked xen-cpufreq and drivers so the same kernel is able to run
> >    on bare metal and within Xen.
> >
> > Changed since v2:
> >  * used VIRQ_CPUFREQ with number 14 instead of the 13
> >  * slightly reworked xen-cpufreq driver
> >
> > Oleksandr Dmytryshyn (8):
> >   PM / OPP: make cpufreq functions dependent on CONFIG_CPU_FREQ_TABLE
> >   xen/arm: implement HYPERVISOR_sysctl
> >   xen/arm: implement HYPERVISOR_dom0_op
> >   xen/arm: add XEN_SYSCTL_cpufreq_op definition
> >   cpufreq: cpufreq-cpu0: change cpus data path in devtree for Dom0
> >     kernel
> >   cpufreq: introduce cpufreq_drv_ops
> >   cpufreq: make cpufreq low-level drivers visible for CPUFREQ_DRV_OPS
> >     config
> >   xen/arm: cpufreq: add xen-cpufreq driver
> >
> >  arch/arm/include/asm/xen/hypercall.h |   2 +
> >  arch/arm/include/asm/xen/interface.h |   2 +
> >  arch/arm/xen/enlighten.c             |   2 +
> >  arch/arm/xen/hypercall.S             |   2 +
> >  drivers/Makefile                     |   2 +-
> >  drivers/base/power/opp.c             |   4 +-
> >  drivers/cpufreq/Kconfig              |  39 +-
> >  drivers/cpufreq/Makefile             |   2 +
> >  drivers/cpufreq/acpi-cpufreq.c       |   5 +-
> >  drivers/cpufreq/cpufreq-cpu0.c       |  10 +-
> >  drivers/cpufreq/cpufreq.c            | 116 +++--
> >  drivers/cpufreq/cpufreq_drv_ops.c    | 196 ++++++++
> >  drivers/cpufreq/cpufreq_drv_ops.h    |  54 +++
> >  drivers/cpufreq/cpufreq_governor.c   |   4 +-
> >  drivers/cpufreq/xen-cpufreq.c        | 889 
> > +++++++++++++++++++++++++++++++++++
> >  include/linux/cpufreq.h              |   2 +-
> >  include/linux/opp.h                  |   2 +-
> >  include/xen/interface/platform.h     |   1 +
> >  include/xen/interface/sysctl.h       | 664 ++++++++++++++++++++++++++
> >  include/xen/interface/xen.h          |   7 +
> >  20 files changed, 1939 insertions(+), 66 deletions(-)
> >  create mode 100644 drivers/cpufreq/cpufreq_drv_ops.c
> >  create mode 100644 drivers/cpufreq/cpufreq_drv_ops.h
> >  create mode 100644 drivers/cpufreq/xen-cpufreq.c
> >  create mode 100644 include/xen/interface/sysctl.h
> >
> > --
> > 1.9.1
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-devel
> >

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.