Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
On 14 August 2013 14:20, Xiaoguang Chen wrote: > Hi, Viresh > After checking your patch, I find that __cpufreq_set_policy function > doesn't check STOP and EXIT 's return value > is it on purpose? if not, I can provide a patch to add it. I thought we probably can't break on these calls here,

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar : > On 14 August 2013 13:49, Xiaoguang Chen wrote: >> Yes, "START (If STOP passed)", this is important, we don't have this >> patch on our code base, So even Process B's STOP failed(as governor >> enable flag is set to false by process A already ), it can still do >> START

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
On 14 August 2013 13:49, Xiaoguang Chen wrote: > Yes, "START (If STOP passed)", this is important, we don't have this > patch on our code base, So even Process B's STOP failed(as governor > enable flag is set to false by process A already ), it can still do > START operation, So my problem

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar : > I am still not sure if I got what you are trying to say, sorry :( > > On 14 August 2013 13:06, Xiaoguang Chen wrote: >> Please see below code in __cpufreq_governor function >> >> mutex_lock(_governor_lock); >> if ((!policy->governor_enabled && (event ==

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
I am still not sure if I got what you are trying to say, sorry :( On 14 August 2013 13:06, Xiaoguang Chen wrote: > Please see below code in __cpufreq_governor function > > mutex_lock(_governor_lock); > if ((!policy->governor_enabled && (event == CPUFREQ_GOV_STOP)) || >

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar : > On 13 August 2013 12:39, Xiaoguang Chen wrote: >> __cpufreq_governor operation needs to be executed one by one. >> If one operation is ongoing, the other operation can't be executed. >> If the order is not guaranteed, there may be unexpected behavior. > > What order?? I

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar viresh.ku...@linaro.org: On 13 August 2013 12:39, Xiaoguang Chen che...@marvell.com wrote: __cpufreq_governor operation needs to be executed one by one. If one operation is ongoing, the other operation can't be executed. If the order is not guaranteed, there may be

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
I am still not sure if I got what you are trying to say, sorry :( On 14 August 2013 13:06, Xiaoguang Chen chenxg.marv...@gmail.com wrote: Please see below code in __cpufreq_governor function mutex_lock(cpufreq_governor_lock); if ((!policy-governor_enabled (event == CPUFREQ_GOV_STOP)) ||

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar viresh.ku...@linaro.org: I am still not sure if I got what you are trying to say, sorry :( On 14 August 2013 13:06, Xiaoguang Chen chenxg.marv...@gmail.com wrote: Please see below code in __cpufreq_governor function mutex_lock(cpufreq_governor_lock); if

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
On 14 August 2013 13:49, Xiaoguang Chen chenxg.marv...@gmail.com wrote: Yes, START (If STOP passed), this is important, we don't have this patch on our code base, So even Process B's STOP failed(as governor enable flag is set to false by process A already ), it can still do START operation,

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Xiaoguang Chen
2013/8/14 Viresh Kumar viresh.ku...@linaro.org: On 14 August 2013 13:49, Xiaoguang Chen chenxg.marv...@gmail.com wrote: Yes, START (If STOP passed), this is important, we don't have this patch on our code base, So even Process B's STOP failed(as governor enable flag is set to false by process

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-14 Thread Viresh Kumar
On 14 August 2013 14:20, Xiaoguang Chen chenxg.marv...@gmail.com wrote: Hi, Viresh After checking your patch, I find that __cpufreq_set_policy function doesn't check STOP and EXIT 's return value is it on purpose? if not, I can provide a patch to add it. I thought we probably can't break on

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-13 Thread Viresh Kumar
On 13 August 2013 12:39, Xiaoguang Chen wrote: > __cpufreq_governor operation needs to be executed one by one. > If one operation is ongoing, the other operation can't be executed. > If the order is not guaranteed, there may be unexpected behavior. What order?? > For example, governor is in

[PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-13 Thread Xiaoguang Chen
__cpufreq_governor operation needs to be executed one by one. If one operation is ongoing, the other operation can't be executed. If the order is not guaranteed, there may be unexpected behavior. For example, governor is in enable state, and one process tries to stop the goveror, but it is

[PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-13 Thread Xiaoguang Chen
__cpufreq_governor operation needs to be executed one by one. If one operation is ongoing, the other operation can't be executed. If the order is not guaranteed, there may be unexpected behavior. For example, governor is in enable state, and one process tries to stop the goveror, but it is

Re: [PATCH 1/2] cpufreq: Add governor operation ongoing flag

2013-08-13 Thread Viresh Kumar
On 13 August 2013 12:39, Xiaoguang Chen che...@marvell.com wrote: __cpufreq_governor operation needs to be executed one by one. If one operation is ongoing, the other operation can't be executed. If the order is not guaranteed, there may be unexpected behavior. What order?? For example,