From: Joseph Lo <josephl@nvidia.com>
To: Colin Cross <ccross@android.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Neil Zhang <zhangwm@marvell.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH 2/3] cpuidle: coupled: abort idle if pokes are pending
Date: Mon, 26 Aug 2013 17:10:21 +0800 [thread overview]
Message-ID: <1377508221.16229.34.camel@jlo-ubuntu-64.nvidia.com> (raw)
In-Reply-To: <1377287112-12018-2-git-send-email-ccross@android.com>
On Sat, 2013-08-24 at 03:45 +0800, Colin Cross wrote:
> Joseph Lo <josephl@nvidia.com> reported a lockup on Tegra3 caused
> by a race condition in coupled cpuidle. When two or more cpus
Actually this issue can be reproduced on both Tegra20/30 platforms. And
I suggest using Tegra20 to replace Tegra3 here, we only apply coupled
CPU idle function on Tegra20 in the mainline right now.
> enter idle at the same time, the first cpus to arrive may go to the
> ready loop without processing pending pokes from the last cpu to
> arrive.
>
> This patch adds a check for pending pokes once all cpus have been
> synchronized in the ready loop and resets the coupled state and
> retries if any cpus failed to handle their pending poke.
>
> Retrying on all cpus may trigger the same issue again, so this patch
> also adds a check to ensure that each cpu has received at least one
> poke between when it enters the waiting loop and when it moves on to
> the ready loop.
>
> Reported-by: Joseph Lo <josephl@nvidia.com>
> CC: stable@vger.kernel.org
> Signed-off-by: Colin Cross <ccross@android.com>
> ---
> drivers/cpuidle/coupled.c | 107 +++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 82 insertions(+), 25 deletions(-)
>
[snip]
> +/*
> + * The cpuidle_coupled_poke_pending mask is used to ensure that each cpu has
s/cpuidle_coupled_poke_pending/cpuidle_coupled_poked/? :)
> + * been poked once to minimize entering the ready loop with a poke pending,
> + * which would require aborting and retrying.
> + */
> +static cpumask_t cpuidle_coupled_poked;
>
I fixed this issue by checking if there is a pending SGI, then abort the
coupled state on Tegra20. It still can be reproduced easily if I remove
the checking code. So I tested the case with this patch, the result is
good. This patch can fix the issue indeed.
I also tested with the other two patches. It didn't cause any
regression.
So this series:
Tested-by: Joseph Lo <josephl@nvidia.com>
next prev parent reply other threads:[~2013-08-26 9:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 19:45 [PATCH 1/3] cpuidle: coupled: disable interrupts after entering safe state Colin Cross
2013-08-23 19:45 ` [PATCH 2/3] cpuidle: coupled: abort idle if pokes are pending Colin Cross
2013-08-26 9:10 ` Joseph Lo [this message]
2013-08-23 19:45 ` [PATCH 3/3] cpuidle: coupled: fix race condition between pokes and safe state Colin Cross
2013-08-27 8:57 ` Neil Zhang
2013-08-23 23:09 ` [PATCH 1/3] cpuidle: coupled: disable interrupts after entering " Stephen Warren
2013-08-24 0:22 ` Colin Cross
2013-08-26 15:55 ` Stephen Warren
2013-08-28 21:28 ` Rafael J. Wysocki
2013-08-28 22:00 ` Colin Cross
2013-08-29 0:50 ` Rafael J. Wysocki
2013-08-29 6:50 ` Prashant Gaikwad
2013-08-29 7:12 ` Colin Cross
2013-08-29 20:09 ` Rafael J. Wysocki
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=1377508221.16229.34.camel@jlo-ubuntu-64.nvidia.com \
--to=josephl@nvidia.com \
--cc=ccross@android.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=stable@vger.kernel.org \
--cc=zhangwm@marvell.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®