Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1348802

Re: [PATCH 3/6] cpufreq: governor: New data type for management part of dbs_data

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/6] cpufreq: governor: New data type for management part of dbs_data
Date 2016-03-03 07:00 +0100
Message-ID <r8usO-2yU-9@gated-at.bofh.it> (permalink)
References <r84I2-18B-15@gated-at.bofh.it> <r84I2-18B-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02-03-16, 03:08, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> In addition to fields representing governor tunables, struct dbs_data
> contains some fields needed for the management of objects of that
> type.  As it turns out, that part of struct dbs_data may be shared
> with (future) governors that won't use the common code used by
> "ondemand" and "conservative", so move it to a separate struct type
> and modify the code using struct dbs_data to follow.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/cpufreq/cpufreq_conservative.c |   15 +++--
>  drivers/cpufreq/cpufreq_governor.c     |   90 ++++++++++++++++++++-------------
>  drivers/cpufreq/cpufreq_governor.h     |   36 +++++++------
>  drivers/cpufreq/cpufreq_ondemand.c     |   19 ++++--
>  4 files changed, 97 insertions(+), 63 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.h
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.h
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.h
> @@ -41,6 +41,13 @@
>  /* Ondemand Sampling types */
>  enum {OD_NORMAL_SAMPLE, OD_SUB_SAMPLE};
>  
> +struct gov_tunables {
> +	struct kobject kobj;
> +	struct list_head policy_list;
> +	struct mutex update_lock;
> +	int usage_count;
> +};

Everything else looks fine, but I don't think that you have named it
properly. Every thing else present in struct dbs_data are tunables,
but not this. And so gov_tunables doesn't suit at all here..

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/6] cpufreq: governor: New data type for management part of dbs_data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-02 03:30 +0100
  Re: [PATCH 3/6] cpufreq: governor: New data type for management part  of dbs_data Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-03 07:00 +0100
    Re: [PATCH 3/6] cpufreq: governor: New data type for management part  of dbs_data "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-03 20:30 +0100
      Re: [PATCH 3/6] cpufreq: governor: New data type for management part  of dbs_data Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-04 06:50 +0100

csiph-web