From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lina Iyer <lina.iyer@linaro.org>, linux-pm@vger.kernel.org
Cc: linus.walleij@linaro.org, arnd.bergmann@linaro.org,
rjw@rjwysocki.net, tglx@linutronix.de
Subject: Re: [RFC] [PATCH 0/3] IRQ affinity notifier and per-cpu PM QoS
Date: Fri, 01 Aug 2014 13:54:26 +0200 [thread overview]
Message-ID: <53DB7FF2.3040203@linaro.org> (raw)
In-Reply-To: <1406307334-8288-1-git-send-email-lina.iyer@linaro.org>
On 07/25/2014 06:55 PM, Lina Iyer wrote:
> This series of patches adds a new feature to allow per-cpu PM QoS.
Hi Lina,
this description lacks in the reason of why allowing per cpu PM QoS is
needed. Could you give the context of the proposed feature ?
> The first of the patch, modifies the irq manager to allow multiple clients for
> IRQ SMP affinity change notification. Today, only one client can register a
> notification per IRQ. The PM QoS framework is also now interested in knowing
> when the SMP affinity changes for an IRQ.
Why ?
> With the current implementation, a
> second registration on the change notification releases the current
> notification callbacks and registers the new one. Modify the notification
> mechanism to use a list for notification instead of single data structure.
May be this is not necessary if the notification is always needed. Even
if that breaks the code encapsulation, invoking directly a pm_qos
function when the irq is changed, in addition of the notification,
should suffice instead of adding a list of notifications with all the
races that implies.
> Also, a client that wants to de-register from the notification will now need to
> call a separate API instead of the overloaded function call with a NULL
> argument.
>
> The next two patches re-organize PM QoS framework to allow QoS and the Dev PM
> QoS frameworks to specify a request type. Most requestors of PM QoS do not know
> or care about the CPU(s) the QoS needs to be effected. In many cases, it is
> still desirable to have the QoS apply on all available cpus. However, in
> conjunction with an IRQ balancer or a driver that has specific cpu(s)
> requirement for its use, can specify a QoS request only for that set of cpus.
> For example in a case, where a certain IRQ might need a performance QoS, but
> does not want to affect the general power consumption of all the cpus in the
> system, can specify an QoS request thats affine only to that cpu(s), where the
> IRQ can be triggered.
>
> The change adds ability to specify the PM QoS request types and two new PM QoS
> request types in addition to the default that applies to all cpus.
>
> PM_QOS_REQ_AFFINE_CORES: This allows drivers to specify a certain set of cpus
> that the request should be applied on.
>
> PM_QOS_REQ_AFFINE_IRQ: This allows drivers to specify an IRQ to which the QoS
> request can be tracked with. This uses the IRQ SMP affinity notification to set
> the cpumask of the affected cpus internally.
>
> The request defaults to PM_QOS_REQ_ALL_CORES when not explicitly specified and
> applies the request to all cpus.
>
> There is also a provision to read the QoS request value for a constraint, for a
> constraint for a set of cpus or just a cpu. CPUIdle governors can use this
> feature to get a QoS request for the cpu(s) they are interested in.
IMHO, it would be desirable first to implement a per cpu pm_qos without
adding any extra new request or features, so we can comment it focused
on how to do that.
> Lina Iyer (3):
> irq: Allow multiple clients to register for irq affinity notification
> QoS: Modify data structures and function arguments for scalability.
> QoS: Enhance framework to support cpu/irq specific QoS requests
>
> Documentation/power/pm_qos_interface.txt | 18 +++
> drivers/base/power/qos.c | 14 +--
> drivers/infiniband/hw/qib/qib_iba7322.c | 4 +-
> include/linux/interrupt.h | 12 +-
> include/linux/irq.h | 1 +
> include/linux/irqdesc.h | 6 +-
> include/linux/pm_qos.h | 23 +++-
> kernel/irq/irqdesc.c | 1 +
> kernel/irq/manage.c | 77 ++++++++-----
> kernel/power/qos.c | 184 ++++++++++++++++++++++++++++++-
> lib/cpu_rmap.c | 2 +-
> 11 files changed, 289 insertions(+), 53 deletions(-)
>
--
<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:[~2014-08-01 11:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 16:55 [RFC] [PATCH 0/3] IRQ affinity notifier and per-cpu PM QoS Lina Iyer
2014-07-25 16:55 ` [RFC] [PATCH 1/3] irq: Allow multiple clients to register for irq affinity notification Lina Iyer
2014-08-01 14:48 ` Daniel Lezcano
2014-08-01 15:26 ` Lina Iyer
2014-07-25 16:55 ` [RFC] [PATCH 2/3] QoS: Modify data structures and function arguments for scalability Lina Iyer
2014-07-25 16:55 ` [RFC] [PATCH 3/3] QoS: Enhance framework to support cpu/irq specific QoS requests Lina Iyer
2014-08-01 15:58 ` Daniel Lezcano
2014-08-01 17:11 ` Lina Iyer
2014-08-01 11:54 ` 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=53DB7FF2.3040203@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=arnd.bergmann@linaro.org \
--cc=lina.iyer@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.