Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Saravana Kannan
On 02/02/2016 10:54 PM, Viresh Kumar wrote: On 02-02-16, 17:32, Saravana Kannan wrote: But if we are expecting sched dvfs to come in, why make it worse for it. It would be completely pointless to try and shoehorn sched dvfs to use cpufreq_governor.c We can move the common part to cpufreq core

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Saravana Kannan
On 02/02/2016 10:57 PM, Viresh Kumar wrote: On 02-02-16, 20:03, Saravana Kannan wrote: This is the hotplug case I mentioned. The sysfs file removals will happen only for the last CPU in that policy (we thankfully optimized that part last year). We also know that multiple CPUs can't be hotplugged

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Rafael J. Wysocki
On Wed, Feb 3, 2016 at 2:21 PM, Viresh Kumar wrote: > On 03-02-16, 13:42, Rafael J. Wysocki wrote: >> > +static ssize_t governor_show(struct kobject *kobj, struct attribute *attr, >> > +char *buf) >> > +{ >> > + struct dbs_data *dbs_data = to_dbs_data(kobj); >> >

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Viresh Kumar
On 03-02-16, 13:42, Rafael J. Wysocki wrote: > > +static ssize_t governor_show(struct kobject *kobj, struct attribute *attr, > > +char *buf) > > +{ > > + struct dbs_data *dbs_data = to_dbs_data(kobj); > > + struct governor_attr *gattr = to_gov_attr(attr); > >

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Rafael J. Wysocki
On Wed, Feb 3, 2016 at 7:58 AM, Viresh Kumar wrote: > On 02-02-16, 22:23, Rafael J. Wysocki wrote: >> On Tue, Feb 2, 2016 at 11:57 AM, Viresh Kumar >> wrote: > >> "The ondemand and conservative governors use the global-attr or >> freq-attr structures to represent sysfs attributes corresponding t

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Viresh Kumar
On 03-02-16, 10:51, Juri Lelli wrote: > I also think that sched-dvfs should not use cpufreq_governor.c. It is > useful boilerplate code for ondemand and conservative, as they share lot > of data structures and how they work, but it doesn't necessarily suit > everybody's needs, IMHO. > > OTOH, fix

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-03 Thread Juri Lelli
On 03/02/16 12:24, Viresh Kumar wrote: > On 02-02-16, 17:32, Saravana Kannan wrote: > > But if we are expecting sched dvfs to come in, why make it worse for it. It > > would be completely pointless to try and shoehorn sched dvfs to use > > cpufreq_governor.c > > We can move the common part to cpuf

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Viresh Kumar
On 02-02-16, 22:23, Rafael J. Wysocki wrote: > On Tue, Feb 2, 2016 at 11:57 AM, Viresh Kumar wrote: > "The ondemand and conservative governors use the global-attr or > freq-attr structures to represent sysfs attributes corresponding to > their tunables > (which of them is actually used depends o

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Viresh Kumar
On 02-02-16, 20:03, Saravana Kannan wrote: > This is the hotplug case I mentioned. The sysfs file removals will happen > only for the last CPU in that policy (we thankfully optimized that part last > year). We also know that multiple CPUs can't be hotplugged at the same time. > So, in the start of

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Viresh Kumar
On 02-02-16, 17:32, Saravana Kannan wrote: > But if we are expecting sched dvfs to come in, why make it worse for it. It > would be completely pointless to try and shoehorn sched dvfs to use > cpufreq_governor.c We can move the common part to cpufreq core and not make sched-dvfs reuse cpufreq_gove

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Viresh Kumar
On 02-02-16, 14:21, Saravana Kannan wrote: > I also don't like this patch because it forces governors to either implement > their own macros and management of their attributes or force them to use the > governor structs that come with cpufreq_governor.h. cpufreq_governor.h IMHO > is very ondemand a

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Viresh Kumar
On 02-02-16, 17:01, Juri Lelli wrote: > Hi Rafael, > > On 02/02/16 17:35, Rafael J. Wysocki wrote: > > On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: > > > This patch cleans things up a lot, that's good. > > > > > > One thing I'm still concerned about, though: don't we need some locking > > >

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Saravana Kannan
On 02/02/2016 05:52 PM, Rafael J. Wysocki wrote: On Wed, Feb 3, 2016 at 2:32 AM, Saravana Kannan wrote: On 02/02/2016 05:07 PM, Rafael J. Wysocki wrote: On Wed, Feb 3, 2016 at 12:42 AM, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 11:21 PM, Saravana Kannan wrote: On 02/02/2016 11:40

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Wed, Feb 3, 2016 at 2:32 AM, Saravana Kannan wrote: > On 02/02/2016 05:07 PM, Rafael J. Wysocki wrote: >> >> On Wed, Feb 3, 2016 at 12:42 AM, Rafael J. Wysocki >> wrote: >>> >>> On Tue, Feb 2, 2016 at 11:21 PM, Saravana Kannan >>> wrote: On 02/02/2016 11:40 AM, Rafael J. Wysocki wro

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Saravana Kannan
On 02/02/2016 05:07 PM, Rafael J. Wysocki wrote: On Wed, Feb 3, 2016 at 12:42 AM, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 11:21 PM, Saravana Kannan wrote: On 02/02/2016 11:40 AM, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 6:01 PM, Juri Lelli wrote: [cut] I also don't li

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Wed, Feb 3, 2016 at 12:42 AM, Rafael J. Wysocki wrote: > On Tue, Feb 2, 2016 at 11:21 PM, Saravana Kannan > wrote: >> On 02/02/2016 11:40 AM, Rafael J. Wysocki wrote: >>> >>> On Tue, Feb 2, 2016 at 6:01 PM, Juri Lelli wrote: [cut] >> >> I also don't like this patch because it forces g

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Tue, Feb 2, 2016 at 11:21 PM, Saravana Kannan wrote: > On 02/02/2016 11:40 AM, Rafael J. Wysocki wrote: >> >> On Tue, Feb 2, 2016 at 6:01 PM, Juri Lelli wrote: >>> >>> Hi Rafael, >>> >>> On 02/02/16 17:35, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: >>

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Saravana Kannan
On 02/02/2016 11:40 AM, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 6:01 PM, Juri Lelli wrote: Hi Rafael, On 02/02/16 17:35, Rafael J. Wysocki wrote: On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: Hi Viresh, On 02/02/16 16:27, Viresh Kumar wrote: Until now, governors (ondemand/cons

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Tue, Feb 2, 2016 at 11:57 AM, Viresh Kumar wrote: First, the subject might be better. What about something like "cpufreq: governor: New sysfs show/store callbacks for governor tunables", for example? > Until now, governors (ondemand/conservative) were using the > 'global-attr' or 'freq-attr'

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Tue, Feb 2, 2016 at 6:01 PM, Juri Lelli wrote: > Hi Rafael, > > On 02/02/16 17:35, Rafael J. Wysocki wrote: >> On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: >> > Hi Viresh, >> > >> > On 02/02/16 16:27, Viresh Kumar wrote: >> >> Until now, governors (ondemand/conservative) were using the >>

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Juri Lelli
Hi Rafael, On 02/02/16 17:35, Rafael J. Wysocki wrote: > On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: > > Hi Viresh, > > > > On 02/02/16 16:27, Viresh Kumar wrote: > >> Until now, governors (ondemand/conservative) were using the > >> 'global-attr' or 'freq-attr', depending on the sysfs locat

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Rafael J. Wysocki
On Tue, Feb 2, 2016 at 4:47 PM, Juri Lelli wrote: > Hi Viresh, > > On 02/02/16 16:27, Viresh Kumar wrote: >> Until now, governors (ondemand/conservative) were using the >> 'global-attr' or 'freq-attr', depending on the sysfs location where we >> want to create governor's directory. >> >> The probl

Re: [PATCH 2/5] cpufreq: governor: Create separate sysfs-ops

2016-02-02 Thread Juri Lelli
Hi Viresh, On 02/02/16 16:27, Viresh Kumar wrote: > Until now, governors (ondemand/conservative) were using the > 'global-attr' or 'freq-attr', depending on the sysfs location where we > want to create governor's directory. > > The problem is that, in case of 'freq-attr', we are forced to use > s