From: lina.iyer@linaro.org (Lina Iyer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 2/3] PM / Domains: Support atomic PM domains
Date: Wed, 10 Jun 2015 14:35:19 -0600 [thread overview]
Message-ID: <20150610203519.GB7715@linaro.org> (raw)
In-Reply-To: <7hy4jrmoch.fsf@deeprootsystems.com>
On Wed, Jun 10 2015 at 12:04 -0600, Kevin Hilman wrote:
>Lina Iyer <lina.iyer@linaro.org> writes:
>
>> Power Domains currently support turning on/off only in process context.
>
>Generic Power Domains...
>
>Also Re: $SUBJECT. s/atomic/IRQ safe/
>
Okay.
>> This restricts the usage of PM domains to devices and domains that
>> could be powered on/off in irq disabled contexts as the mutexes used in
>> GenPD allows for cpu sleep while waiting for locks.
>
>That sentence reads the opposite of what you mean. Rather than "This
>restricts X to Y", I think you menant "This prevents X for Y".
>
Will reword.
>> Genpd inherently provides support for devices, domain hierarchy and can
>
>s/domain heirarchy/nesting/
>
Ok
>> be used to represent cpu clusters like in ARM's big.Little, where, each
>> cpu cluster is in its domain, with supporting caches and other
>> peripheral hardware.
>
>s/domain/power domain/
>
OK
>> Multiple such domains could be part of another domain.
>
>OK, but not important to this change IMO.
>
>> Because mutexes are used to protect and synchronize domain
>
>s/domain/genpd/
>
Ya, genpd is better word.
>> operations and cpu idle operations are inherently atomic,
>
>Be more specific about "CPU idle operations are inherently atomic", as
>it's not obvious that it's true. I think what you mean is that
>the CPUidle paths for entering of low-power idle states is inherently
>atomic because interrupts are disabled.
>
Will explain
>> the use of
>> genpd is not possible for runtime suspend and resume of the pm domain.
>
>... so, the use of genpd during the idle path of CPUs is not currently
>possible because interrups are disabled in the idle path.
>
>> Replacing the locks to spinlocks would allow cpu domain to be be powered
> ^^^^
>s/to/with/
>
Ok
>> off to save power, when all the cpus are powered off.
>
>More accuratly, replacing the locks doesn't allow the domain to be
>powered off, rather it allows genpd to be used in the idle path, which
>would allow genpd to be used
>
>> However, not all domains can operate in irq-safe contexts and usually
>> would need to sleep during domain operations. So genpd has to support
>> both the cases, where the domain is or is not irq-safe. The irq-safe
>> attribute is therefore domain specific.
>>
>> To achieve domain specific locking, set the GENPD_FLAG_IRQ_SAFE flag
>> while defining the domain. This determines if the domain should use a
>> spinlock instead of a mutex. Locking is abstracted through
>> genpd_lock_domain() and genpd_unlock_domain() functions that use the
>> flag to determine the locking to be used for this domain.
>>
>> The restriction this imposes on the domain hierarchy is that subdomains
>> and all devices in the hierarchy also be irq-safe. Non irq-safe domains
>> may continue to have irq-safe devices, but not the other way around.
>
>This might need some corresponding updates to Documentation/ as well.
>
Agreed. Will add documentation in the next spin.
Thanks for the review Kevin.
-- Lina
next prev parent reply other threads:[~2015-06-10 20:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 22:29 [PATCH RFC 0/3] PM / Domains: Generic PM domains for cpus Lina Iyer
2015-06-04 22:29 ` [PATCH RFC 1/3] PM / Domains: Allocate memory outside domain locks Lina Iyer
2015-06-07 8:35 ` Krzysztof Kozlowski
2015-06-09 22:45 ` Lina Iyer
2015-06-10 17:33 ` Kevin Hilman
2015-06-04 22:29 ` [PATCH RFC 2/3] PM / Domains: Support atomic PM domains Lina Iyer
2015-06-07 9:21 ` Krzysztof Kozlowski
2015-06-10 16:13 ` Lina Iyer
2015-06-11 0:13 ` Krzysztof Kozlowski
2015-06-11 14:33 ` Lina Iyer
2015-06-10 18:04 ` Kevin Hilman
2015-06-10 20:35 ` Lina Iyer [this message]
2015-06-11 9:41 ` Ulf Hansson
2015-06-11 19:47 ` Lina Iyer
2015-06-11 21:13 ` Ulf Hansson
2015-06-04 22:29 ` [PATCH RFC 3/3] PM / Domains: Introduce generic PM domain for cpu domain Lina Iyer
2015-06-07 9:42 ` Krzysztof Kozlowski
2015-06-10 16:57 ` Lina Iyer
2015-06-11 0:27 ` Krzysztof Kozlowski
2015-06-11 14:42 ` Lina Iyer
2015-06-10 17:01 ` Kevin Hilman
2015-06-11 0:35 ` Krzysztof Kozlowski
2015-06-10 21:37 ` Kevin Hilman
2015-06-11 14:56 ` Lina Iyer
2015-06-15 18:43 ` Kevin Hilman
2015-06-15 19:14 ` Lina Iyer
2015-06-16 15:50 ` Kevin Hilman
2015-06-10 17:24 ` [PATCH RFC 0/3] PM / Domains: Generic PM domains for cpus Kevin Hilman
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=20150610203519.GB7715@linaro.org \
--to=lina.iyer@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).