* Re: [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
@ 2013-07-15 15:25 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 14+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-07-15 15:25 UTC (permalink / raw)
To: Julien Grall
Cc: stefano.stabellini, ian.campbell, patches, linux-kernel,
xen-devel, linux-arm-kernel
On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
> When linux is running as dom0, Xen doesn't show the physical cpu but a
> virtual CPU.
> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> for cpuidle. When these callbacks are called, they will modify
> directly the physical cpu not the virtual one. It can impact the whole board
> instead of dom0.
Should you also call disable_cpufreq() ?
>
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> ---
> arch/arm/xen/enlighten.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 49839d8..a98999f 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -24,6 +24,8 @@
> #include <linux/of.h>
> #include <linux/of_irq.h>
> #include <linux/of_address.h>
> +#include <linux/cpuidle.h>
> +#include <linux/cpufreq.h>
>
> #include <linux/mm.h>
>
> @@ -292,6 +294,11 @@ static int __init xen_pm_init(void)
> {
> pm_power_off = xen_power_off;
> arm_pm_restart = xen_restart;
> + /*
> + * Making sure board specific code will not set up ops for
> + * cpu idle.
> + */
> + disable_cpuidle();
>
> return 0;
> }
> --
> 1.7.10.4
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 14+ messages in thread* [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-15 15:25 ` Konrad Rzeszutek Wilk
@ 2013-07-15 16:22 ` Julien Grall
-1 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-15 16:22 UTC (permalink / raw)
To: linux-arm-kernel
On 07/15/2013 04:25 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> When linux is running as dom0, Xen doesn't show the physical cpu but a
>> virtual CPU.
>> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> for cpuidle. When these callbacks are called, they will modify
>> directly the physical cpu not the virtual one. It can impact the whole board
>> instead of dom0.
>
> Should you also call disable_cpufreq() ?
I had some issue on the versatile express when cpufreq was disabled.
I will give another try and see the exact error.
--
Julien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
@ 2013-07-15 16:22 ` Julien Grall
0 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-15 16:22 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: stefano.stabellini, ian.campbell, patches, linux-kernel,
xen-devel, linux-arm-kernel
On 07/15/2013 04:25 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> When linux is running as dom0, Xen doesn't show the physical cpu but a
>> virtual CPU.
>> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> for cpuidle. When these callbacks are called, they will modify
>> directly the physical cpu not the virtual one. It can impact the whole board
>> instead of dom0.
>
> Should you also call disable_cpufreq() ?
I had some issue on the versatile express when cpufreq was disabled.
I will give another try and see the exact error.
--
Julien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-15 15:25 ` Konrad Rzeszutek Wilk
(?)
(?)
@ 2013-07-15 16:22 ` Julien Grall
-1 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-15 16:22 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: ian.campbell, patches, stefano.stabellini, linux-kernel,
xen-devel, linux-arm-kernel
On 07/15/2013 04:25 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> When linux is running as dom0, Xen doesn't show the physical cpu but a
>> virtual CPU.
>> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> for cpuidle. When these callbacks are called, they will modify
>> directly the physical cpu not the virtual one. It can impact the whole board
>> instead of dom0.
>
> Should you also call disable_cpufreq() ?
I had some issue on the versatile express when cpufreq was disabled.
I will give another try and see the exact error.
--
Julien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-15 15:25 ` Konrad Rzeszutek Wilk
` (2 preceding siblings ...)
(?)
@ 2013-07-17 13:28 ` Stefano Stabellini
-1 siblings, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2013-07-17 13:28 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: ian.campbell, patches, Julien Grall, linux-kernel, xen-devel,
linux-arm-kernel, stefano.stabellini
On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
> > When linux is running as dom0, Xen doesn't show the physical cpu but a
> > virtual CPU.
> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> > for cpuidle. When these callbacks are called, they will modify
> > directly the physical cpu not the virtual one.
> It can impact the whole board
> > instead of dom0.
Certainly this is something that should be fixed at the hypervisor level
too. However I agree that Linux should try to avoid doing that when
running on Xen.
> Should you also call disable_cpufreq() ?
Sounds like a good idea.
Julien, could you add that to this patch?
> >
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> > ---
> > arch/arm/xen/enlighten.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> > index 49839d8..a98999f 100644
> > --- a/arch/arm/xen/enlighten.c
> > +++ b/arch/arm/xen/enlighten.c
> > @@ -24,6 +24,8 @@
> > #include <linux/of.h>
> > #include <linux/of_irq.h>
> > #include <linux/of_address.h>
> > +#include <linux/cpuidle.h>
> > +#include <linux/cpufreq.h>
> >
> > #include <linux/mm.h>
> >
> > @@ -292,6 +294,11 @@ static int __init xen_pm_init(void)
> > {
> > pm_power_off = xen_power_off;
> > arm_pm_restart = xen_restart;
> > + /*
> > + * Making sure board specific code will not set up ops for
> > + * cpu idle.
> > + */
> > + disable_cpuidle();
> >
> > return 0;
> > }
> > --
> > 1.7.10.4
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
^ permalink raw reply [flat|nested] 14+ messages in thread* [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-15 15:25 ` Konrad Rzeszutek Wilk
@ 2013-07-17 13:28 ` Stefano Stabellini
-1 siblings, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2013-07-17 13:28 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
> > When linux is running as dom0, Xen doesn't show the physical cpu but a
> > virtual CPU.
> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> > for cpuidle. When these callbacks are called, they will modify
> > directly the physical cpu not the virtual one.
> It can impact the whole board
> > instead of dom0.
Certainly this is something that should be fixed at the hypervisor level
too. However I agree that Linux should try to avoid doing that when
running on Xen.
> Should you also call disable_cpufreq() ?
Sounds like a good idea.
Julien, could you add that to this patch?
> >
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> > ---
> > arch/arm/xen/enlighten.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> > index 49839d8..a98999f 100644
> > --- a/arch/arm/xen/enlighten.c
> > +++ b/arch/arm/xen/enlighten.c
> > @@ -24,6 +24,8 @@
> > #include <linux/of.h>
> > #include <linux/of_irq.h>
> > #include <linux/of_address.h>
> > +#include <linux/cpuidle.h>
> > +#include <linux/cpufreq.h>
> >
> > #include <linux/mm.h>
> >
> > @@ -292,6 +294,11 @@ static int __init xen_pm_init(void)
> > {
> > pm_power_off = xen_power_off;
> > arm_pm_restart = xen_restart;
> > + /*
> > + * Making sure board specific code will not set up ops for
> > + * cpu idle.
> > + */
> > + disable_cpuidle();
> >
> > return 0;
> > }
> > --
> > 1.7.10.4
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel at lists.xen.org
> > http://lists.xen.org/xen-devel
>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
@ 2013-07-17 13:28 ` Stefano Stabellini
0 siblings, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2013-07-17 13:28 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Julien Grall, stefano.stabellini, ian.campbell, patches,
linux-kernel, xen-devel, linux-arm-kernel
On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
> > When linux is running as dom0, Xen doesn't show the physical cpu but a
> > virtual CPU.
> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> > for cpuidle. When these callbacks are called, they will modify
> > directly the physical cpu not the virtual one.
> It can impact the whole board
> > instead of dom0.
Certainly this is something that should be fixed at the hypervisor level
too. However I agree that Linux should try to avoid doing that when
running on Xen.
> Should you also call disable_cpufreq() ?
Sounds like a good idea.
Julien, could you add that to this patch?
> >
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> > ---
> > arch/arm/xen/enlighten.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> > index 49839d8..a98999f 100644
> > --- a/arch/arm/xen/enlighten.c
> > +++ b/arch/arm/xen/enlighten.c
> > @@ -24,6 +24,8 @@
> > #include <linux/of.h>
> > #include <linux/of_irq.h>
> > #include <linux/of_address.h>
> > +#include <linux/cpuidle.h>
> > +#include <linux/cpufreq.h>
> >
> > #include <linux/mm.h>
> >
> > @@ -292,6 +294,11 @@ static int __init xen_pm_init(void)
> > {
> > pm_power_off = xen_power_off;
> > arm_pm_restart = xen_restart;
> > + /*
> > + * Making sure board specific code will not set up ops for
> > + * cpu idle.
> > + */
> > + disable_cpuidle();
> >
> > return 0;
> > }
> > --
> > 1.7.10.4
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-17 13:28 ` Stefano Stabellini
(?)
@ 2013-07-18 17:20 ` Julien Grall
-1 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-18 17:20 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Ian Campbell, Patch Tracking, linux-kernel,
xen-devel@lists.xen.org, linux-arm-kernel
On 17 July 2013 14:28, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
>> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> > When linux is running as dom0, Xen doesn't show the physical cpu but a
>> > virtual CPU.
>> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> > for cpuidle. When these callbacks are called, they will modify
>> > directly the physical cpu not the virtual one.
>> It can impact the whole board
>> > instead of dom0.
>
> Certainly this is something that should be fixed at the hypervisor level
> too. However I agree that Linux should try to avoid doing that when
> running on Xen.
>
>
>
>> Should you also call disable_cpufreq() ?
>
> Sounds like a good idea.
> Julien, could you add that to this patch?
I have checked with both the Arndale and Versatile Express without any issue.
I will resend this patch with disable_cpufreq().
--
Julien Grall
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
2013-07-17 13:28 ` Stefano Stabellini
@ 2013-07-18 17:20 ` Julien Grall
-1 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-18 17:20 UTC (permalink / raw)
To: linux-arm-kernel
On 17 July 2013 14:28, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
>> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> > When linux is running as dom0, Xen doesn't show the physical cpu but a
>> > virtual CPU.
>> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> > for cpuidle. When these callbacks are called, they will modify
>> > directly the physical cpu not the virtual one.
>> It can impact the whole board
>> > instead of dom0.
>
> Certainly this is something that should be fixed at the hypervisor level
> too. However I agree that Linux should try to avoid doing that when
> running on Xen.
>
>
>
>> Should you also call disable_cpufreq() ?
>
> Sounds like a good idea.
> Julien, could you add that to this patch?
I have checked with both the Arndale and Versatile Express without any issue.
I will resend this patch with disable_cpufreq().
--
Julien Grall
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Xen-devel] [PATCH] xen/arm: disable cpuidle when linux is running as dom0
@ 2013-07-18 17:20 ` Julien Grall
0 siblings, 0 replies; 14+ messages in thread
From: Julien Grall @ 2013-07-18 17:20 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Konrad Rzeszutek Wilk, Ian Campbell, Patch Tracking, linux-kernel,
xen-devel@lists.xen.org, linux-arm-kernel
On 17 July 2013 14:28, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Mon, 15 Jul 2013, Konrad Rzeszutek Wilk wrote:
>> On Mon, Jul 15, 2013 at 03:21:41PM +0100, Julien Grall wrote:
>> > When linux is running as dom0, Xen doesn't show the physical cpu but a
>> > virtual CPU.
>> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
>> > for cpuidle. When these callbacks are called, they will modify
>> > directly the physical cpu not the virtual one.
>> It can impact the whole board
>> > instead of dom0.
>
> Certainly this is something that should be fixed at the hypervisor level
> too. However I agree that Linux should try to avoid doing that when
> running on Xen.
>
>
>
>> Should you also call disable_cpufreq() ?
>
> Sounds like a good idea.
> Julien, could you add that to this patch?
I have checked with both the Arndale and Versatile Express without any issue.
I will resend this patch with disable_cpufreq().
--
Julien Grall
^ permalink raw reply [flat|nested] 14+ messages in thread