All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
To: Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: "Shilimkar,
	Santosh" <santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
	Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>,
	Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Amit Kucheria
	<amit.kucheria-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [linux-pm] [PATCH 0/3] coupled cpuidle state support
Date: Thu, 22 Dec 2011 13:20:38 -0800	[thread overview]
Message-ID: <CAMbhsRQDLdozcK0uazMd2gSxRMdPqMq6vAE2__k08BBFCQS3eQ@mail.gmail.com> (raw)
In-Reply-To: <4EF2F01E.8060307-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On Thu, Dec 22, 2011 at 12:53 AM, Arjan van de Ven
<arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
> On 12/22/2011 9:35 AM, Shilimkar, Santosh wrote:
>
>> Indeed. The SOCs, Arch's which does support low power
>> state independently and doesn't need any co-ordination between CPU's
>> will continue to work same way as before with this series.
>
> btw I think you misunderstand; I don't object to a need for something
> like this, I am just very concerned that this may not be possible to be
> done in a race-free way.

I agree that there are many potential races in this code, but I
believe I've handled all of them.  This patch set is a refactoring of
the common parts of the SMP idle code that has shipped on Tegra and
OMAP4 devices, so the basic idea has been hammered on extensively.

I think I've explained the protection against the race condition you
asked about earlier.  As for the power impact, the power savings of
getting into the deeper coupled power states far outweighs the cost of
booting all coupled cpus out of idle and letting them loop back to a
shallower idle state.

On an OMAP4 platform, at the slowest cpu speed, the system-wide power
usage with both cpus in the non-coupled state (WFI) is around 50 mA,
while the deepest coupled state is 12 mA.  At the fastest cpu speed,
WFI is over 100 mA.

On some platforms it may be possible to have only one cpu boot out of
idle when an interrupt arrives, but that introduces the race condition
you asked about before, where the last cpu tries to go into idle at
the same time that an already-idle cpu comes back out.  This way has
fairly minimal overhead (booting the 2nd cpu and then going to WFI),
and that's a path that already needs to be fast because it's part of
the normal single-cpu idle path.

WARNING: multiple messages have this Message-ID (diff)
From: Colin Cross <ccross@android.com>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	Kevin Hilman <khilman@ti.com>, Len Brown <len.brown@intel.com>,
	linux-kernel@vger.kernel.org,
	Amit Kucheria <amit.kucheria@linaro.org>,
	linux-tegra@vger.kernel.org, linux-pm@lists.linux-foundation.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [linux-pm] [PATCH 0/3] coupled cpuidle state support
Date: Thu, 22 Dec 2011 13:20:38 -0800	[thread overview]
Message-ID: <CAMbhsRQDLdozcK0uazMd2gSxRMdPqMq6vAE2__k08BBFCQS3eQ@mail.gmail.com> (raw)
In-Reply-To: <4EF2F01E.8060307@linux.intel.com>

On Thu, Dec 22, 2011 at 12:53 AM, Arjan van de Ven
<arjan@linux.intel.com> wrote:
> On 12/22/2011 9:35 AM, Shilimkar, Santosh wrote:
>
>> Indeed. The SOCs, Arch's which does support low power
>> state independently and doesn't need any co-ordination between CPU's
>> will continue to work same way as before with this series.
>
> btw I think you misunderstand; I don't object to a need for something
> like this, I am just very concerned that this may not be possible to be
> done in a race-free way.

I agree that there are many potential races in this code, but I
believe I've handled all of them.  This patch set is a refactoring of
the common parts of the SMP idle code that has shipped on Tegra and
OMAP4 devices, so the basic idea has been hammered on extensively.

I think I've explained the protection against the race condition you
asked about earlier.  As for the power impact, the power savings of
getting into the deeper coupled power states far outweighs the cost of
booting all coupled cpus out of idle and letting them loop back to a
shallower idle state.

On an OMAP4 platform, at the slowest cpu speed, the system-wide power
usage with both cpus in the non-coupled state (WFI) is around 50 mA,
while the deepest coupled state is 12 mA.  At the fastest cpu speed,
WFI is over 100 mA.

On some platforms it may be possible to have only one cpu boot out of
idle when an interrupt arrives, but that introduces the race condition
you asked about before, where the last cpu tries to go into idle at
the same time that an already-idle cpu comes back out.  This way has
fairly minimal overhead (booting the 2nd cpu and then going to WFI),
and that's a path that already needs to be fast because it's part of
the normal single-cpu idle path.

WARNING: multiple messages have this Message-ID (diff)
From: ccross@android.com (Colin Cross)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-pm] [PATCH 0/3] coupled cpuidle state support
Date: Thu, 22 Dec 2011 13:20:38 -0800	[thread overview]
Message-ID: <CAMbhsRQDLdozcK0uazMd2gSxRMdPqMq6vAE2__k08BBFCQS3eQ@mail.gmail.com> (raw)
In-Reply-To: <4EF2F01E.8060307@linux.intel.com>

On Thu, Dec 22, 2011 at 12:53 AM, Arjan van de Ven
<arjan@linux.intel.com> wrote:
> On 12/22/2011 9:35 AM, Shilimkar, Santosh wrote:
>
>> Indeed. The SOCs, Arch's which does support low power
>> state independently and doesn't need any co-ordination between CPU's
>> will continue to work same way as before with this series.
>
> btw I think you misunderstand; I don't object to a need for something
> like this, I am just very concerned that this may not be possible to be
> done in a race-free way.

I agree that there are many potential races in this code, but I
believe I've handled all of them.  This patch set is a refactoring of
the common parts of the SMP idle code that has shipped on Tegra and
OMAP4 devices, so the basic idea has been hammered on extensively.

I think I've explained the protection against the race condition you
asked about earlier.  As for the power impact, the power savings of
getting into the deeper coupled power states far outweighs the cost of
booting all coupled cpus out of idle and letting them loop back to a
shallower idle state.

On an OMAP4 platform, at the slowest cpu speed, the system-wide power
usage with both cpus in the non-coupled state (WFI) is around 50 mA,
while the deepest coupled state is 12 mA.  At the fastest cpu speed,
WFI is over 100 mA.

On some platforms it may be possible to have only one cpu boot out of
idle when an interrupt arrives, but that introduces the race condition
you asked about before, where the last cpu tries to go into idle at
the same time that an already-idle cpu comes back out.  This way has
fairly minimal overhead (booting the 2nd cpu and then going to WFI),
and that's a path that already needs to be fast because it's part of
the normal single-cpu idle path.

  parent reply	other threads:[~2011-12-22 21:20 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21  0:09 [PATCH 0/3] coupled cpuidle state support Colin Cross
2011-12-21  0:09 ` Colin Cross
2011-12-21  0:09 ` Colin Cross
2011-12-21  0:09 ` [PATCH 1/3] cpuidle: refactor out cpuidle_enter_state Colin Cross
2011-12-21  0:09   ` Colin Cross
2011-12-21  0:09   ` Colin Cross
2012-01-04 14:08   ` Jean Pihet
2012-01-04 14:08     ` [linux-pm] " Jean Pihet
2012-01-04 14:08     ` Jean Pihet
     [not found] ` <1324426147-16735-1-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-12-21  0:09   ` [PATCH 2/3] cpuidle: fix error handling in __cpuidle_register_device Colin Cross
2011-12-21  0:09     ` Colin Cross
2011-12-21  0:09     ` Colin Cross
2011-12-21  0:09 ` Colin Cross
2011-12-21  0:09 ` [PATCH 3/3] cpuidle: add support for states that affect multiple cpus Colin Cross
2011-12-21  0:09 ` Colin Cross
2011-12-21  0:09   ` Colin Cross
2011-12-21  9:02 ` [PATCH 0/3] coupled cpuidle state support Arjan van de Ven
2011-12-21  9:02 ` Arjan van de Ven
2011-12-21  9:02   ` Arjan van de Ven
     [not found]   ` <4EF1A0B4.5080307-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-12-21  9:40     ` Colin Cross
2011-12-21  9:40       ` Colin Cross
2011-12-21  9:40       ` Colin Cross
2011-12-21  9:44       ` Arjan van de Ven
2011-12-21  9:44         ` Arjan van de Ven
2011-12-21  9:44         ` Arjan van de Ven
     [not found]         ` <4EF1AA8A.8060304-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-12-21  9:55           ` Colin Cross
2011-12-21  9:55             ` Colin Cross
2011-12-21  9:55             ` Colin Cross
2011-12-21 12:12             ` Arjan van de Ven
2011-12-21 12:12             ` Arjan van de Ven
2011-12-21 12:12               ` Arjan van de Ven
2011-12-21 19:05               ` Colin Cross
2011-12-21 19:05                 ` Colin Cross
2011-12-21 19:05                 ` Colin Cross
     [not found]                 ` <CAMbhsRRnKoR3YPWrZzVynVe+dcuU5v0siYvmp2vbBcS1hquC7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-21 19:36                   ` Arjan van de Ven
2011-12-21 19:36                     ` Arjan van de Ven
2011-12-21 19:36                     ` Arjan van de Ven
2011-12-21 19:42                     ` Colin Cross
2011-12-21 19:42                       ` [linux-pm] " Colin Cross
2011-12-21 19:42                       ` Colin Cross
     [not found]                       ` <CAMbhsRSPCo9MSGp57Fv0sRdYUFcdwx8jEz1-CfX8LdKf8X4MVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-22  8:35                         ` Shilimkar, Santosh
2011-12-22  8:35                           ` Shilimkar, Santosh
2011-12-22  8:35                           ` Shilimkar, Santosh
2011-12-22  8:53                           ` Arjan van de Ven
2011-12-22  8:53                             ` [linux-pm] " Arjan van de Ven
2011-12-22  8:53                             ` Arjan van de Ven
2011-12-22  9:30                             ` Shilimkar, Santosh
2011-12-22  9:30                             ` [linux-pm] " Shilimkar, Santosh
2011-12-22  9:30                               ` Shilimkar, Santosh
2011-12-22 21:20                             ` Colin Cross
     [not found]                             ` <4EF2F01E.8060307-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-12-22 21:20                               ` Colin Cross [this message]
2011-12-22 21:20                                 ` [linux-pm] " Colin Cross
2011-12-22 21:20                                 ` Colin Cross
2011-12-22  8:35                       ` Shilimkar, Santosh
2011-12-21 19:36                 ` Arjan van de Ven
     [not found]               ` <4EF1CD49.9020800-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2012-03-14  0:39                 ` Colin Cross
2012-03-14  0:39                   ` Colin Cross
2012-03-14  0:39                   ` Colin Cross
2011-12-21  9:55         ` Colin Cross
2011-12-21  9:40   ` Colin Cross
2012-01-04  0:41 ` Kevin Hilman
2012-01-04  0:41   ` Kevin Hilman
2012-01-04  0:41   ` Kevin Hilman
2012-01-04 17:27   ` Shilimkar, Santosh
2012-01-04 17:27   ` Shilimkar, Santosh
2012-01-04 17:27     ` Shilimkar, Santosh
2012-01-20  8:46 ` Daniel Lezcano
2012-01-20  8:46   ` Daniel Lezcano
2012-01-20  8:46   ` Daniel Lezcano
2012-01-20 20:40   ` Colin Cross
2012-01-20 20:40     ` Colin Cross
2012-01-20 20:40     ` Colin Cross
2012-01-25 14:04     ` Daniel Lezcano
2012-01-25 14:04       ` Daniel Lezcano
2012-01-31 14:13       ` Daniel Lezcano
2012-01-31 14:13         ` Daniel Lezcano
     [not found]     ` <CAMbhsRTbVqV6p0py9NGZrpFPf2yvp-B0dr+o-m7qbdja_-Lfzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-27  8:54       ` [linux-pm] " Vincent Guittot
2012-01-27  8:54         ` Vincent Guittot
2012-01-27  8:54         ` Vincent Guittot
2012-01-27 17:32         ` Colin Cross
2012-01-27 17:32           ` Colin Cross
2012-01-27 17:32           ` Colin Cross
     [not found]           ` <CAMbhsRQYVXTZ2pX4mBrM6=SyGTqn_GY8xsW4rt_e21zerEzctA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-01 12:13             ` Vincent Guittot
2012-02-01 12:13               ` Vincent Guittot
2012-02-01 12:13               ` Vincent Guittot
2012-02-01 14:59               ` Lorenzo Pieralisi
2012-02-01 14:59                 ` [linux-pm] " Lorenzo Pieralisi
2012-02-01 14:59                 ` Lorenzo Pieralisi
2012-02-01 17:30                 ` Colin Cross
2012-02-01 17:30                   ` Colin Cross
2012-02-01 17:30                   ` Colin Cross
2012-02-01 18:07                   ` Lorenzo Pieralisi
2012-02-01 18:07                     ` [linux-pm] " Lorenzo Pieralisi
2012-02-01 18:07                     ` Lorenzo Pieralisi
2012-02-03  1:19                     ` Colin Cross
2012-02-03  1:19                       ` [linux-pm] " Colin Cross
2012-02-03  1:19                       ` Colin Cross
2012-03-13 23:52   ` Kevin Hilman
2012-03-13 23:52     ` Kevin Hilman
     [not found]     ` <8762e8kqi6.fsf-l0cyMroinI0@public.gmane.org>
2012-03-14  0:28       ` Colin Cross
2012-03-14  0:28         ` Colin Cross
2012-03-14  0:28         ` Colin Cross
2012-03-14  0:47         ` Colin Cross
2012-03-14  0:47           ` Colin Cross
2012-03-14  0:47           ` Colin Cross
     [not found]           ` <CAMbhsRRD2bdkcUZvScb-cF05e=R3h69bNVaTPFX4jBKBBOjuMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-14 14:23             ` [linux-pm] " Kevin Hilman
2012-03-14 14:23               ` Kevin Hilman
2012-03-14 14:23               ` Kevin Hilman
2012-03-14  2:04     ` Arjan van de Ven
2012-03-14  2:04       ` Arjan van de Ven
2012-03-14  2:04       ` Arjan van de Ven
2012-03-14  2:21       ` Colin Cross
2012-03-14  2:21         ` Colin Cross
2012-03-14  2:21         ` Colin Cross

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=CAMbhsRQDLdozcK0uazMd2gSxRMdPqMq6vAE2__k08BBFCQS3eQ@mail.gmail.com \
    --to=ccross-z5hga2qsfarbdgjk7y7tuq@public.gmane.org \
    --cc=amit.kucheria-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=khilman-l0cyMroinI0@public.gmane.org \
    --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=santosh.shilimkar-l0cyMroinI0@public.gmane.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 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.