Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-20 Thread Lukasz Majewski
On Thu, 20 Jun 2013 10:31:30 +0530, Viresh Kumar wrote: > > I'd say there needs to be a separate controller/monitor for that > > that will know what the chip's thermal limit is and how that > > relates to how fast the CPU core(s) may run and for how much time. > > I'm not sure it is sufficient to "

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-19 Thread Lukasz Majewski
On Thu, 20 Jun 2013 10:41:41 +0530, Viresh Kumar wrote: > On 19 June 2013 12:46, Lukasz Majewski wrote: > > I would like to clarify the above issue. > > > > When I've discussed with Viresh previous version of this patch, we > > have agreed, that "boost" sysfs attribute [*]: > > /sys/devices/system

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-19 Thread Viresh Kumar
On 19 June 2013 12:46, Lukasz Majewski wrote: > I would like to clarify the above issue. > > When I've discussed with Viresh previous version of this patch, we have > agreed, that "boost" sysfs attribute [*]: > /sys/devices/system/cpu/cpufreq/boost > > would be only visible when boost_supported fl

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-19 Thread Viresh Kumar
On 18 June 2013 18:56, Rafael J. Wysocki wrote: > On Tuesday, June 18, 2013 12:12:13 PM Viresh Kumar wrote: >> On 17 June 2013 19:21, Lukasz Majewski wrote: >> According to my understanding, boost was important for power >> saving. In case a high load can be managed by a single cpu with >> boost

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-19 Thread Viresh Kumar
On 18 June 2013 19:14, Lukasz Majewski wrote: > On Tue, 18 Jun 2013 15:26:16 +0200, Rafael J. Wysocki wrote: >> On Tuesday, June 18, 2013 12:12:13 PM Viresh Kumar wrote: >> > On 17 June 2013 19:21, Lukasz Majewski >> Well, that's why on x86 turbo is controlled by hardware that takes >> care of k

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-19 Thread Lukasz Majewski
On Tue, 18 Jun 2013 15:44:56 +0200, Lukasz Majewski wrote: Dear Viesh, Rafael, > > > > I'd recommend you both to read Documentation/cpu-freq/boost.txt > > now. :-) > > > According to the documentation: > "Reading the file is always supported, even if the processor does not > support boosting

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-18 Thread Lukasz Majewski
On Tue, 18 Jun 2013 15:26:16 +0200, Rafael J. Wysocki wrote: > On Tuesday, June 18, 2013 12:12:13 PM Viresh Kumar wrote: > > On 17 June 2013 19:21, Lukasz Majewski > > wrote: > > > On Mon, 17 Jun 2013 18:40:50 +0530, Viresh Kumar wrote: > > >> >> > The core acpi-cpufreq.c code hadn't been changed

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-18 Thread Rafael J. Wysocki
On Tuesday, June 18, 2013 12:12:13 PM Viresh Kumar wrote: > On 17 June 2013 19:21, Lukasz Majewski wrote: > > On Mon, 17 Jun 2013 18:40:50 +0530, Viresh Kumar wrote: > >> >> > The core acpi-cpufreq.c code hadn't been changed by me, so I > >> >> > assume that it will work as before. > >> >> > >> >>

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-18 Thread Lukasz Majewski
On Tue, 18 Jun 2013 14:10:28 +0530, Viresh Kumar wrote: > On 18 June 2013 13:54, Lukasz Majewski wrote: > > On Tue, 18 Jun 2013 08:42:13 +0200, Viresh Kumar wrote: > > >> Its not about how long.. One cpu type can work longer with boost > >> freq compared to other. > >> > >> What we probably need

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-18 Thread Viresh Kumar
On 18 June 2013 13:54, Lukasz Majewski wrote: > On Tue, 18 Jun 2013 08:42:13 +0200, Viresh Kumar wrote: >> Its not about how long.. One cpu type can work longer with boost freq >> compared to other. >> >> What we probably need is: >> - Enabled boost from sysfs if required (now below steps will co

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-18 Thread Lukasz Majewski
On Tue, 18 Jun 2013 08:42:13 +0200, Viresh Kumar wrote: > On 17 June 2013 19:21, Lukasz Majewski wrote: > > On Mon, 17 Jun 2013 18:40:50 +0530, Viresh Kumar wrote: > >> >> > The core acpi-cpufreq.c code hadn't been changed by me, so I > >> >> > assume that it will work as before. > >> >> > >> >> T

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Viresh Kumar
On 17 June 2013 19:21, Lukasz Majewski wrote: > On Mon, 17 Jun 2013 18:40:50 +0530, Viresh Kumar wrote: >> >> > The core acpi-cpufreq.c code hadn't been changed by me, so I >> >> > assume that it will work as before. >> >> >> >> That should adapt your patch in your patchset. > > Could you explain

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Lukasz Majewski
On Mon, 17 Jun 2013 18:40:50 +0530, Viresh Kumar wrote: > On 17 June 2013 15:28, Lukasz Majewski wrote: > > Yes. But I don't want to hardcode anything. Especially starting CPU > > number. > > There is nothing wrong with it. for_each_online_cpu() is good enough > on these cases. I've already chan

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Viresh Kumar
On 17 June 2013 15:28, Lukasz Majewski wrote: > Yes. But I don't want to hardcode anything. Especially starting CPU > number. There is nothing wrong with it. for_each_online_cpu() is good enough on these cases. >> > How one can control the boost? I'm now (on my setup) using thermal >> > subsyste

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Lukasz Majewski
On Mon, 17 Jun 2013 14:48:51 +0530, Viresh Kumar wrote: > On 17 June 2013 14:38, Lukasz Majewski wrote: > > On Mon, 17 Jun 2013 09:43:27 +0200, Viresh Kumar wrote: > > >> Many cpus share same policy structure and so iterating over all of > >> them isn't a very good idea. Either keep a mask of cpu

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Viresh Kumar
On 17 June 2013 14:38, Lukasz Majewski wrote: > On Mon, 17 Jun 2013 09:43:27 +0200, Viresh Kumar wrote: >> Many cpus share same policy structure and so iterating over all of >> them isn't a very good idea. Either keep a mask of cpus already >> iterated, copy policy->cpus to it on each iteration.

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Lukasz Majewski
On Mon, 17 Jun 2013 09:43:27 +0200, Viresh Kumar wrote: > On 17 June 2013 12:45, Lukasz Majewski wrote: > > On Mon, 17 Jun 2013 11:13:18 +0530, Viresh Kumar wrote: > >> On 14 June 2013 13:08, Lukasz Majewski > >> wrote: > > >> > +int cpufreq_boost_trigger_state(int state) +{ > > >> > + if

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Viresh Kumar
On 17 June 2013 12:45, Lukasz Majewski wrote: > On Mon, 17 Jun 2013 11:13:18 +0530, Viresh Kumar wrote: >> On 14 June 2013 13:08, Lukasz Majewski wrote: >> > +int cpufreq_boost_trigger_state(int state) +{ >> > + if (!cpufreq_driver->boost_supported) >> > + return -ENODEV; >>

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-17 Thread Lukasz Majewski
On Mon, 17 Jun 2013 11:13:18 +0530, Viresh Kumar wrote: > On 14 June 2013 13:08, Lukasz Majewski wrote: > > Changes for v2: > > - Removal of cpufreq_boost structure and move its fields to > > cpufreq_driver structure > > - Flag to indicate if global boost attribute is already defined > > - Extent

Re: [PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-16 Thread Viresh Kumar
On 14 June 2013 13:08, Lukasz Majewski wrote: > Changes for v2: > - Removal of cpufreq_boost structure and move its fields to cpufreq_driver > structure > - Flag to indicate if global boost attribute is already defined > - Extent the pr_{err|debbug} functions to show current function names > > C

[PATCH v3 1/3] cpufreq: Add boost frequency support in core

2013-06-14 Thread Lukasz Majewski
This commit adds boost frequency support in cpufreq core (Hardware & Software). Some SoC (like Exynos4 - e.g. 4x12) allow setting frequency above its normal operation limits. Such a mode shall be only used for a short time. Overclocking (boost) support is essentially provided by platform dependent