Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-09 Thread Rafael J. Wysocki
On Wednesday, September 09, 2015 08:00:20 AM Viresh Kumar wrote: > On 09-09-15, 03:06, Rafael J. Wysocki wrote: > > I've just realized that if you combined this patch with the [6/9], > > you wouldn't need to make any changes to gov_queue_work() at all, > > because that patch removes the case in

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-09 Thread Rafael J. Wysocki
On Wednesday, September 09, 2015 08:00:20 AM Viresh Kumar wrote: > On 09-09-15, 03:06, Rafael J. Wysocki wrote: > > I've just realized that if you combined this patch with the [6/9], > > you wouldn't need to make any changes to gov_queue_work() at all, > > because that patch removes the case in

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-08 Thread Viresh Kumar
On 09-09-15, 03:06, Rafael J. Wysocki wrote: > I've just realized that if you combined this patch with the [6/9], > you wouldn't need to make any changes to gov_queue_work() at all, > because that patch removes the case in point entirely. Yeah, but then these are really two separate issues at

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-08 Thread Rafael J. Wysocki
On Tuesday, September 08, 2015 07:28:31 AM Viresh Kumar wrote: > On 08-09-15, 03:11, Rafael J. Wysocki wrote: > > There really are two cases, either you pass a CPU or gov_queue_work() has to > > walk policy->cpus. > > Right (At least for now, we are doing just that.) > > > Doing it the way you

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-08 Thread Rafael J. Wysocki
On Tuesday, September 08, 2015 07:28:31 AM Viresh Kumar wrote: > On 08-09-15, 03:11, Rafael J. Wysocki wrote: > > There really are two cases, either you pass a CPU or gov_queue_work() has to > > walk policy->cpus. > > Right (At least for now, we are doing just that.) > > > Doing it the way you

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-08 Thread Viresh Kumar
On 09-09-15, 03:06, Rafael J. Wysocki wrote: > I've just realized that if you combined this patch with the [6/9], > you wouldn't need to make any changes to gov_queue_work() at all, > because that patch removes the case in point entirely. Yeah, but then these are really two separate issues at

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-07 Thread Viresh Kumar
On 08-09-15, 03:11, Rafael J. Wysocki wrote: > There really are two cases, either you pass a CPU or gov_queue_work() has to > walk policy->cpus. Right (At least for now, we are doing just that.) > Doing it the way you did hides that IMO. Maybe. But I see it otherwise. Adding special meaning to

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-07 Thread Rafael J. Wysocki
On Monday, July 27, 2015 05:58:08 PM Viresh Kumar wrote: > The sampling rate is updated with a call to update_sampling_rate(), and > we process CPUs one by one here. While the work is canceled on per-cpu > basis, it is getting queued (by mistake) for all policy->cpus. > > This would result in

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-07 Thread Rafael J. Wysocki
On Monday, July 27, 2015 05:58:08 PM Viresh Kumar wrote: > The sampling rate is updated with a call to update_sampling_rate(), and > we process CPUs one by one here. While the work is canceled on per-cpu > basis, it is getting queued (by mistake) for all policy->cpus. > > This would result in

Re: [PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-09-07 Thread Viresh Kumar
On 08-09-15, 03:11, Rafael J. Wysocki wrote: > There really are two cases, either you pass a CPU or gov_queue_work() has to > walk policy->cpus. Right (At least for now, we are doing just that.) > Doing it the way you did hides that IMO. Maybe. But I see it otherwise. Adding special meaning to

[PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-07-27 Thread Viresh Kumar
The sampling rate is updated with a call to update_sampling_rate(), and we process CPUs one by one here. While the work is canceled on per-cpu basis, it is getting queued (by mistake) for all policy->cpus. This would result in wasting cpu cycles for queuing works which are already queued and

[PATCH V2 3/9] cpufreq: ondemand: only queue canceled works from update_sampling_rate()

2015-07-27 Thread Viresh Kumar
The sampling rate is updated with a call to update_sampling_rate(), and we process CPUs one by one here. While the work is canceled on per-cpu basis, it is getting queued (by mistake) for all policy-cpus. This would result in wasting cpu cycles for queuing works which are already queued and never