linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info
@ 2012-07-23  7:35 Amit Daniel Kachhap
  2012-07-23 10:23 ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Daniel Kachhap @ 2012-07-23  7:35 UTC (permalink / raw)
  To: cpufreq; +Cc: rjw, linux-pm, amit.kachhap, linux-kernel

This patch initialises the cpu field of this_dbs_info structure. This
change is similar to existing ondemand governor.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
 drivers/cpufreq/cpufreq_conservative.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 235a340..a1563d7 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
 				j_dbs_info->prev_cpu_nice =
 						kcpustat_cpu(j).cpustat[CPUTIME_NICE];
 		}
+		this_dbs_info->cpu = cpu;
 		this_dbs_info->down_skip = 0;
 		this_dbs_info->requested_freq = policy->cur;
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info
  2012-07-23  7:35 [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info Amit Daniel Kachhap
@ 2012-07-23 10:23 ` Rafael J. Wysocki
       [not found]   ` <CAK44p23wcPmK1c7PvobfuaFFaQ9FNDax9J-3iipgvEOCM5gWGQ@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-07-23 10:23 UTC (permalink / raw)
  To: Amit Daniel Kachhap; +Cc: cpufreq, linux-pm, amit.kachhap, linux-kernel

On Monday, July 23, 2012, Amit Daniel Kachhap wrote:
> This patch initialises the cpu field of this_dbs_info structure. This
> change is similar to existing ondemand governor.

Why do you think the change is needed?

Rafael


> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
> ---
>  drivers/cpufreq/cpufreq_conservative.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
> index 235a340..a1563d7 100644
> --- a/drivers/cpufreq/cpufreq_conservative.c
> +++ b/drivers/cpufreq/cpufreq_conservative.c
> @@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
>  				j_dbs_info->prev_cpu_nice =
>  						kcpustat_cpu(j).cpustat[CPUTIME_NICE];
>  		}
> +		this_dbs_info->cpu = cpu;
>  		this_dbs_info->down_skip = 0;
>  		this_dbs_info->requested_freq = policy->cur;
>  
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info
       [not found]   ` <CAK44p23wcPmK1c7PvobfuaFFaQ9FNDax9J-3iipgvEOCM5gWGQ@mail.gmail.com>
@ 2012-07-23 18:55     ` Rafael J. Wysocki
  2012-07-24  8:24       ` amit daniel kachhap
  2012-07-24  9:26       ` [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start Amit Daniel Kachhap
  0 siblings, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-07-23 18:55 UTC (permalink / raw)
  To: Amit Daniel Kachhap; +Cc: cpufreq, linux-pm, linux-kernel

On Monday, July 23, 2012, Amit Daniel Kachhap wrote:
> On 23 July 2012 15:53, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> 
> > On Monday, July 23, 2012, Amit Daniel Kachhap wrote:
> > > This patch initialises the cpu field of this_dbs_info structure. This
> > > change is similar to existing ondemand governor.
> >
> > Why do you think the change is needed?
> >
> > Rafael
> >
> 
> I agree that this field is not used anywhere currently but I was trying to
> perform some experiments and then this un-initialised field caused issues
> so i thought of fixing this up.

So perhaps please write in the changelog that this is to keep governors
consistent with each other or something like this.  Without explanation it
looks pointless.

Thanks,
Rafael


> > > Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
> > > ---
> > >  drivers/cpufreq/cpufreq_conservative.c |    1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/drivers/cpufreq/cpufreq_conservative.c
> > b/drivers/cpufreq/cpufreq_conservative.c
> > > index 235a340..a1563d7 100644
> > > --- a/drivers/cpufreq/cpufreq_conservative.c
> > > +++ b/drivers/cpufreq/cpufreq_conservative.c
> > > @@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct
> > cpufreq_policy *policy,
> > >                               j_dbs_info->prev_cpu_nice =
> > >
> > kcpustat_cpu(j).cpustat[CPUTIME_NICE];
> > >               }
> > > +             this_dbs_info->cpu = cpu;
> > >               this_dbs_info->down_skip = 0;
> > >               this_dbs_info->requested_freq = policy->cur;
> > >
> > >
> >
> >
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info
  2012-07-23 18:55     ` Rafael J. Wysocki
@ 2012-07-24  8:24       ` amit daniel kachhap
  2012-07-24  9:26       ` [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start Amit Daniel Kachhap
  1 sibling, 0 replies; 6+ messages in thread
From: amit daniel kachhap @ 2012-07-24  8:24 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm, linux-kernel

On Tue, Jul 24, 2012 at 12:25 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Monday, July 23, 2012, Amit Daniel Kachhap wrote:
>> On 23 July 2012 15:53, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>>
>> > On Monday, July 23, 2012, Amit Daniel Kachhap wrote:
>> > > This patch initialises the cpu field of this_dbs_info structure. This
>> > > change is similar to existing ondemand governor.
>> >
>> > Why do you think the change is needed?
>> >
>> > Rafael
>> >
>>
>> I agree that this field is not used anywhere currently but I was trying to
>> perform some experiments and then this un-initialised field caused issues
>> so i thought of fixing this up.
>
> So perhaps please write in the changelog that this is to keep governors
> consistent with each other or something like this.  Without explanation it
> looks pointless.
Ok sure, Will resend the patch with proper change logs.
>
> Thanks,
> Rafael
>
>
>> > > Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
>> > > ---
>> > >  drivers/cpufreq/cpufreq_conservative.c |    1 +
>> > >  1 files changed, 1 insertions(+), 0 deletions(-)
>> > >
>> > > diff --git a/drivers/cpufreq/cpufreq_conservative.c
>> > b/drivers/cpufreq/cpufreq_conservative.c
>> > > index 235a340..a1563d7 100644
>> > > --- a/drivers/cpufreq/cpufreq_conservative.c
>> > > +++ b/drivers/cpufreq/cpufreq_conservative.c
>> > > @@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct
>> > cpufreq_policy *policy,
>> > >                               j_dbs_info->prev_cpu_nice =
>> > >
>> > kcpustat_cpu(j).cpustat[CPUTIME_NICE];
>> > >               }
>> > > +             this_dbs_info->cpu = cpu;
>> > >               this_dbs_info->down_skip = 0;
>> > >               this_dbs_info->requested_freq = policy->cur;
>> > >
>> > >
>> >
>> >
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start
  2012-07-23 18:55     ` Rafael J. Wysocki
  2012-07-24  8:24       ` amit daniel kachhap
@ 2012-07-24  9:26       ` Amit Daniel Kachhap
  2012-08-07 22:22         ` Rafael J. Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: Amit Daniel Kachhap @ 2012-07-24  9:26 UTC (permalink / raw)
  To: cpufreq, Rafael J. Wysocki; +Cc: amit.kachhap, linux-kernel, linux-pm

This change initialises the cpu id field of cs_cpu_dbs_info structure in
conservative governor and keep this consistent with other governors.
Similar initialisation is present in ondemand governor.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
 drivers/cpufreq/cpufreq_conservative.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 235a340..a1563d7 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
 				j_dbs_info->prev_cpu_nice =
 						kcpustat_cpu(j).cpustat[CPUTIME_NICE];
 		}
+		this_dbs_info->cpu = cpu;
 		this_dbs_info->down_skip = 0;
 		this_dbs_info->requested_freq = policy->cur;
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start
  2012-07-24  9:26       ` [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start Amit Daniel Kachhap
@ 2012-08-07 22:22         ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-08-07 22:22 UTC (permalink / raw)
  To: Amit Daniel Kachhap; +Cc: cpufreq, amit.kachhap, linux-kernel, linux-pm

On Tuesday, July 24, 2012, Amit Daniel Kachhap wrote:
> This change initialises the cpu id field of cs_cpu_dbs_info structure in
> conservative governor and keep this consistent with other governors.
> Similar initialisation is present in ondemand governor.
> 
> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>

Applied to the linux-next branch of the linux-pm.git tree as v3.7 material.

Thanks,
Rafael


> ---
>  drivers/cpufreq/cpufreq_conservative.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
> index 235a340..a1563d7 100644
> --- a/drivers/cpufreq/cpufreq_conservative.c
> +++ b/drivers/cpufreq/cpufreq_conservative.c
> @@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
>  				j_dbs_info->prev_cpu_nice =
>  						kcpustat_cpu(j).cpustat[CPUTIME_NICE];
>  		}
> +		this_dbs_info->cpu = cpu;
>  		this_dbs_info->down_skip = 0;
>  		this_dbs_info->requested_freq = policy->cur;
>  
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-07 22:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-23  7:35 [PATCH] [CPUFREQ] conservative: Initialise the cpu field of the this_dbs_info Amit Daniel Kachhap
2012-07-23 10:23 ` Rafael J. Wysocki
     [not found]   ` <CAK44p23wcPmK1c7PvobfuaFFaQ9FNDax9J-3iipgvEOCM5gWGQ@mail.gmail.com>
2012-07-23 18:55     ` Rafael J. Wysocki
2012-07-24  8:24       ` amit daniel kachhap
2012-07-24  9:26       ` [RESEND PATCH] [CPUFREQ] conservative: Initialise the cpu field during governor start Amit Daniel Kachhap
2012-08-07 22:22         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).