* Fix memory leak in cpufreq stats.
@ 2012-10-15 2:48 Tu, Xiaobing
2012-10-15 20:30 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Tu, Xiaobing @ 2012-10-15 2:48 UTC (permalink / raw)
To: davej@redhat.com, akpm@linux-foundation.org, mingo@elte.hu,
rusty@rustcorp.com.au, a.p.zijlstra@chello.nl,
linux-kernel@vger.kernel.org, rostedt@goodmis.org
Cc: Tang, Guifang, Tu, Xiaobing
Fix memory leak in cpufreq stats.
When system enter sleep, non-boot CPUs will be disable.
Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
the CPU going down. This will cause memory leak.
signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
signed-off-by: guifang tang <guifang.tang@intel.com>
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index b40ee14..3998316 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
cpufreq_update_policy(cpu);
break;
case CPU_DOWN_PREPARE:
+ case CPU_DOWN_PREPARE_FROZEN:
cpufreq_stats_free_sysfs(cpu);
break;
case CPU_DEAD:
Br
XiaoBing Tu
PSI@System Integration Shanghai
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: Fix memory leak in cpufreq stats.
@ 2012-10-15 7:04 Tu, Xiaobing
0 siblings, 0 replies; 6+ messages in thread
From: Tu, Xiaobing @ 2012-10-15 7:04 UTC (permalink / raw)
To: Tu, Xiaobing, davej@redhat.com, akpm@linux-foundation.org,
mingo@elte.hu, rusty@rustcorp.com.au, a.p.zijlstra@chello.nl,
linux-kernel@vger.kernel.org, rostedt@goodmis.org
Cc: Tang, Guifang, Zuo, Alex
+alex
-----Original Message-----
From: Tu, Xiaobing
Sent: Monday, October 15, 2012 10:48 AM
To: 'davej@redhat.com'; 'akpm@linux-foundation.org'; 'mingo@elte.hu'; 'rusty@rustcorp.com.au'; 'a.p.zijlstra@chello.nl'; 'linux-kernel@vger.kernel.org'; 'rostedt@goodmis.org'
Cc: Tang, Guifang; Tu, Xiaobing
Subject: Fix memory leak in cpufreq stats.
Fix memory leak in cpufreq stats.
When system enter sleep, non-boot CPUs will be disable.
Cpufreq stats sysfs is created when the CPU is up, but it is not freed when the CPU going down. This will cause memory leak.
signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
signed-off-by: guifang tang <guifang.tang@intel.com>
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index b40ee14..3998316 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
cpufreq_update_policy(cpu);
break;
case CPU_DOWN_PREPARE:
+ case CPU_DOWN_PREPARE_FROZEN:
cpufreq_stats_free_sysfs(cpu);
break;
case CPU_DEAD:
Br
XiaoBing Tu
PSI@System Integration Shanghai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix memory leak in cpufreq stats.
2012-10-15 2:48 Fix memory leak in cpufreq stats Tu, Xiaobing
@ 2012-10-15 20:30 ` Rafael J. Wysocki
2013-03-12 1:23 ` Colin Cross
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-10-15 20:30 UTC (permalink / raw)
To: Tu, Xiaobing
Cc: davej@redhat.com, akpm@linux-foundation.org, mingo@elte.hu,
rusty@rustcorp.com.au, a.p.zijlstra@chello.nl,
linux-kernel@vger.kernel.org, rostedt@goodmis.org, Tang, Guifang
On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote:
>
> Fix memory leak in cpufreq stats.
>
> When system enter sleep, non-boot CPUs will be disable.
> Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
> the CPU going down. This will cause memory leak.
> signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
> signed-off-by: guifang tang <guifang.tang@intel.com>
I will push this patch for v3.7 in the -rc3 time frame if no one objects.
Thanks,
Rafael
> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> index b40ee14..3998316 100644
> --- a/drivers/cpufreq/cpufreq_stats.c
> +++ b/drivers/cpufreq/cpufreq_stats.c
> @@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
> cpufreq_update_policy(cpu);
> break;
> case CPU_DOWN_PREPARE:
> + case CPU_DOWN_PREPARE_FROZEN:
> cpufreq_stats_free_sysfs(cpu);
> break;
> case CPU_DEAD:
>
> Br
> XiaoBing Tu
> PSI@System Integration Shanghai
>
>
> --
> 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/
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix memory leak in cpufreq stats.
2012-10-15 20:30 ` Rafael J. Wysocki
@ 2013-03-12 1:23 ` Colin Cross
2013-03-12 12:14 ` Luis Henriques
2013-03-17 5:13 ` Ben Hutchings
0 siblings, 2 replies; 6+ messages in thread
From: Colin Cross @ 2013-03-12 1:23 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Tu, Xiaobing, davej@redhat.com, akpm@linux-foundation.org,
mingo@elte.hu, rusty@rustcorp.com.au, a.p.zijlstra@chello.nl,
linux-kernel@vger.kernel.org, rostedt@goodmis.org, Tang, Guifang,
stable
On Mon, Oct 15, 2012 at 1:30 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote:
>>
>> Fix memory leak in cpufreq stats.
>>
>> When system enter sleep, non-boot CPUs will be disable.
>> Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
>> the CPU going down. This will cause memory leak.
>> signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
>> signed-off-by: guifang tang <guifang.tang@intel.com>
>
> I will push this patch for v3.7 in the -rc3 time frame if no one objects.
>
> Thanks,
> Rafael
>
>
>> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
>> index b40ee14..3998316 100644
>> --- a/drivers/cpufreq/cpufreq_stats.c
>> +++ b/drivers/cpufreq/cpufreq_stats.c
>> @@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
>> cpufreq_update_policy(cpu);
>> break;
>> case CPU_DOWN_PREPARE:
>> + case CPU_DOWN_PREPARE_FROZEN:
>> cpufreq_stats_free_sysfs(cpu);
>> break;
>> case CPU_DEAD:
>>
>> Br
>> XiaoBing Tu
>> PSI@System Integration Shanghai
This patch, commited as e37736777254ce1abc85493a5cacbefe5983b896 since
v3.7, should also have gone to stable. It should apply all the way
back to 3.0.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix memory leak in cpufreq stats.
2013-03-12 1:23 ` Colin Cross
@ 2013-03-12 12:14 ` Luis Henriques
2013-03-17 5:13 ` Ben Hutchings
1 sibling, 0 replies; 6+ messages in thread
From: Luis Henriques @ 2013-03-12 12:14 UTC (permalink / raw)
To: Colin Cross
Cc: Rafael J. Wysocki, Tu, Xiaobing, davej@redhat.com,
akpm@linux-foundation.org, mingo@elte.hu, rusty@rustcorp.com.au,
a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, Tang, Guifang, stable
On Mon, Mar 11, 2013 at 06:23:27PM -0700, Colin Cross wrote:
> On Mon, Oct 15, 2012 at 1:30 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote:
> >>
> >> Fix memory leak in cpufreq stats.
> >>
> >> When system enter sleep, non-boot CPUs will be disable.
> >> Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
> >> the CPU going down. This will cause memory leak.
> >> signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
> >> signed-off-by: guifang tang <guifang.tang@intel.com>
> >
> > I will push this patch for v3.7 in the -rc3 time frame if no one objects.
> >
> > Thanks,
> > Rafael
> >
> >
> >> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> >> index b40ee14..3998316 100644
> >> --- a/drivers/cpufreq/cpufreq_stats.c
> >> +++ b/drivers/cpufreq/cpufreq_stats.c
> >> @@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
> >> cpufreq_update_policy(cpu);
> >> break;
> >> case CPU_DOWN_PREPARE:
> >> + case CPU_DOWN_PREPARE_FROZEN:
> >> cpufreq_stats_free_sysfs(cpu);
> >> break;
> >> case CPU_DEAD:
> >>
> >> Br
> >> XiaoBing Tu
> >> PSI@System Integration Shanghai
>
> This patch, commited as e37736777254ce1abc85493a5cacbefe5983b896 since
> v3.7, should also have gone to stable. It should apply all the way
> back to 3.0.
Thanks, I'm queuing it for the 3.5 kernel.
Cheers,
--
Luis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix memory leak in cpufreq stats.
2013-03-12 1:23 ` Colin Cross
2013-03-12 12:14 ` Luis Henriques
@ 2013-03-17 5:13 ` Ben Hutchings
1 sibling, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2013-03-17 5:13 UTC (permalink / raw)
To: Colin Cross
Cc: Rafael J. Wysocki, Tu, Xiaobing, davej@redhat.com,
akpm@linux-foundation.org, mingo@elte.hu, rusty@rustcorp.com.au,
a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, Tang, Guifang, stable
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Mon, 2013-03-11 at 18:23 -0700, Colin Cross wrote:
> On Mon, Oct 15, 2012 at 1:30 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote:
> >>
> >> Fix memory leak in cpufreq stats.
> >>
> >> When system enter sleep, non-boot CPUs will be disable.
> >> Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
> >> the CPU going down. This will cause memory leak.
> >> signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
> >> signed-off-by: guifang tang <guifang.tang@intel.com>
> >
> > I will push this patch for v3.7 in the -rc3 time frame if no one objects.
> >
> > Thanks,
> > Rafael
> >
> >
> >> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> >> index b40ee14..3998316 100644
> >> --- a/drivers/cpufreq/cpufreq_stats.c
> >> +++ b/drivers/cpufreq/cpufreq_stats.c
> >> @@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
> >> cpufreq_update_policy(cpu);
> >> break;
> >> case CPU_DOWN_PREPARE:
> >> + case CPU_DOWN_PREPARE_FROZEN:
> >> cpufreq_stats_free_sysfs(cpu);
> >> break;
> >> case CPU_DEAD:
> >>
> >> Br
> >> XiaoBing Tu
> >> PSI@System Integration Shanghai
>
> This patch, commited as e37736777254ce1abc85493a5cacbefe5983b896 since
> v3.7, should also have gone to stable. It should apply all the way
> back to 3.0.
Queued up for 3.2, thanks.
Ben.
--
Ben Hutchings
Usenet is essentially a HUGE group of people passing notes in class.
- Rachel Kadel, `A Quick Guide to Newsgroup Etiquette'
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-17 5:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 2:48 Fix memory leak in cpufreq stats Tu, Xiaobing
2012-10-15 20:30 ` Rafael J. Wysocki
2013-03-12 1:23 ` Colin Cross
2013-03-12 12:14 ` Luis Henriques
2013-03-17 5:13 ` Ben Hutchings
-- strict thread matches above, loose matches on Subject: below --
2012-10-15 7:04 Tu, Xiaobing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox