From: Steven Rostedt <rostedt@goodmis.org>
To: Javi Merino <javi.merino@arm.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
punit.agrawal@arm.com, broonie@kernel.org,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v1 5/7] thermal: add trace events to the power allocator governor
Date: Wed, 28 Jan 2015 12:31:06 -0500 [thread overview]
Message-ID: <20150128123106.05e28afc@gandalf.local.home> (raw)
In-Reply-To: <1422464438-16761-6-git-send-email-javi.merino@arm.com>
On Wed, 28 Jan 2015 17:00:36 +0000
Javi Merino <javi.merino@arm.com> wrote:
> + if (trace_thermal_power_cpu_limit_enabled() && load_cpu) {
> + trace_thermal_power_cpu_get_power(
> + &cpufreq_device->allowed_cpus,
> + freq, load_cpu, i, dynamic_power, static_power);
> +
> + devm_kfree(&cdev->device, load_cpu);
You may want to move the devm_kfree() out of the
trace_thermal_power_cpu_limit_enabled() check. There could be a race
where that gets disabled while this function is running and you just
leaked memory.
if (load_cpu)
devm_kfree(&cdev->device, load_cpu);
should be done by itself.
-- Steve
> + }
>
> *power = static_power + dynamic_power;
> return 0;
> @@ -664,6 +689,8 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev,
> return -EINVAL;
> }
>
> + trace_thermal_power_cpu_limit(&cpufreq_device->allowed_cpus,
> + target_freq, *state, power);
> return 0;
> }
>
next prev parent reply other threads:[~2015-01-29 2:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 17:00 [PATCH v1 0/7] The power allocator thermal governor Javi Merino
2015-01-28 17:00 ` [PATCH v1 1/7] thermal: let governors have private data for each thermal zone Javi Merino
2015-01-28 17:00 ` [PATCH v1 2/7] thermal: extend the cooling device API to include power information Javi Merino
2015-01-28 17:00 ` [PATCH v1 3/7] thermal: cpu_cooling: implement the power cooling device API Javi Merino
2015-01-28 17:56 ` Eduardo Valentin
2015-01-29 19:11 ` Javi Merino
2015-01-28 17:00 ` [PATCH v1 4/7] thermal: introduce the Power Allocator governor Javi Merino
2015-02-02 23:51 ` Lina Iyer
2015-02-03 13:03 ` Javi Merino
2015-02-03 4:31 ` Eduardo Valentin
2015-02-03 17:32 ` Lina Iyer
2015-02-03 19:19 ` Eduardo Valentin
2015-02-04 23:47 ` Lina Iyer
2015-02-09 10:14 ` Javi Merino
2015-02-24 18:21 ` Eduardo Valentin
2015-02-25 14:48 ` Javi Merino
2015-02-25 19:00 ` Eduardo Valentin
2015-02-26 17:52 ` Javi Merino
2015-02-26 20:32 ` Eduardo Valentin
2015-01-28 17:00 ` [PATCH v1 5/7] thermal: add trace events to the power allocator governor Javi Merino
2015-01-28 17:31 ` Steven Rostedt [this message]
2015-02-02 15:44 ` Javi Merino
2015-01-28 17:00 ` [PATCH v1 6/7] of: thermal: Introduce sustainable power for a thermal zone Javi Merino
2015-01-28 17:00 ` [PATCH v1 7/7] thermal: export thermal_zone_parameters to sysfs Javi Merino
2015-02-05 12:06 ` [PATCH v1 0/7] The power allocator thermal governor Javi Merino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150128123106.05e28afc@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=broonie@kernel.org \
--cc=edubezval@gmail.com \
--cc=fweisbec@gmail.com \
--cc=javi.merino@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=punit.agrawal@arm.com \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®