From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Eduardo Valentin <edubezval@gmail.com>,
Javi Merino <javi.merino@kernel.org>,
Leo Yan <leo.yan@linaro.org>,
Kevin Wangtao <kevin.wangtao@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Rui Zhang <rui.zhang@intel.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Andrea Parri <andrea.parri@amarulasolutions.com>,
"open list:POWER MANAGEMENT CORE" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH V9] powercap/drivers/idle_injection: Add an idle injection framework
Date: Mon, 25 Jun 2018 13:48:26 +0200 [thread overview]
Message-ID: <126b6192-cacc-5f99-105e-98fbc8409b0c@linaro.org> (raw)
In-Reply-To: <CAJZ5v0gv9jWyKvhYXrL2a8CqdhrWsNDJ59EDci_ezmfku-2_Ww@mail.gmail.com>
On 25/06/2018 10:41, Rafael J. Wysocki wrote:
> On Tue, Jun 19, 2018 at 3:23 PM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>
> [cut]
>
> One more thing.
>
>> +/**
>> + * idle_injection_register - idle injection init routine
>> + * @cpumask: the list of CPUs managed by the idle injection device
>> + *
>> + * This is the initialization function in charge of creating the
>> + * initializing of the timer and allocate the structures. It does not
>> + * starts the idle injection cycles.
>> + *
>> + * Return: NULL if an allocation fails.
>> + */
>> +struct idle_injection_device *idle_injection_register(struct cpumask *cpumask)
>> +{
>> + struct idle_injection_device *ii_dev;
>> + int cpu, cpu_rb;
>> +
>> + ii_dev = kzalloc(sizeof(*ii_dev) + cpumask_size(), GFP_KERNEL);
>> + if (!ii_dev)
>> + return NULL;
>> +
>> + cpumask_copy(to_cpumask(ii_dev->cpumask), cpumask);
>> + hrtimer_init(&ii_dev->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
>> + ii_dev->timer.function = idle_injection_wakeup_fn;
>> +
>> + for_each_cpu(cpu, to_cpumask(ii_dev->cpumask)) {
>> +
>> + if (per_cpu(idle_injection_device, cpu)) {
>> + pr_err("cpu%d is already registered\n", cpu);
>
> If you print something like this, it should be clear what it is about
> and what piece of code it comes from as there will be no context
> around it it the log.
Is the prefix as pointed by Viresh enough ? Or do want me to add a trace
like:
pr_err("Failed to register 'cpu%d', it is already registered", cpu);
(where "ii_dev:" gives the context)
?
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
prev parent reply other threads:[~2018-06-25 11:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 13:23 Daniel Lezcano
2018-06-20 4:34 ` Viresh Kumar
2018-06-24 22:40 ` Daniel Lezcano
2018-06-25 8:20 ` Rafael J. Wysocki
2018-06-25 9:44 ` Daniel Lezcano
2018-06-25 8:23 ` Rafael J. Wysocki
2018-06-25 8:28 ` Rafael J. Wysocki
2018-06-25 9:44 ` Viresh Kumar
2018-06-25 10:00 ` Rafael J. Wysocki
2018-06-25 11:52 ` Daniel Lezcano
2018-06-25 21:55 ` Rafael J. Wysocki
2018-06-25 22:15 ` Daniel Lezcano
2018-06-26 9:27 ` Rafael J. Wysocki
2018-06-25 8:34 ` Rafael J. Wysocki
2018-06-25 8:41 ` Rafael J. Wysocki
2018-06-25 9:45 ` Viresh Kumar
2018-06-25 11:48 ` Daniel Lezcano [this message]
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=126b6192-cacc-5f99-105e-98fbc8409b0c@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=andrea.parri@amarulasolutions.com \
--cc=daniel.thompson@linaro.org \
--cc=edubezval@gmail.com \
--cc=javi.merino@kernel.org \
--cc=kevin.wangtao@linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
/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®