From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: suspend race -next regression [Was: Power: fix suspend vt regression]
Date: Mon, 31 Aug 2009 21:32:10 +0200 [thread overview]
Message-ID: <200908312132.10904.rjw@sisk.pl> (raw)
In-Reply-To: <4A9B9C1C.9020506@gmail.com>
On Monday 31 August 2009, Jiri Slaby wrote:
> On 08/11/2009 11:19 PM, Jiri Slaby wrote:
> > However there is still a race or something. Sometimes the suspend goes
> > through, sometimes it doesn't. I will investigate this further.
>
> Hmm, this took a loong time to track down a bit. Code instrumentation by
> outb(XX, 0x80) usually caused the issue to disappear.
>
> However I found out that it's caused by might_sleep() calls in
> flush_workqueue() and flush_cpu_workqueue(). I.e. it looks like there is
> a task which deadlocks/spins forever. If we won't reschedule to it,
> suspend proceeds.
>
> I replaced the latter might_sleep() by show_state() and removed
> refrigerated tasks afterwards. The thing is that I don't know if the
> prank task is there. I need a scheduler to store "next" task pid or
> whatever to see what it picked as "next" and so what will run due to
> might_sched(). I can then show it on port 80 display and read it when
> the hangup occurs.
>
> Depending on which might_sleep(), either flush_workqueue() never (well,
> at least in next 5 minutes) proceeds to for_each_cpu() or
> wait_for_completion() in flush_cpu_workqueue() never returns.
>
> It's a regression against some -rc1 based -next tree. Bisection
> impossible, suspend needs to be run even 7 times before it occurs. Maybe
> a s/might_sleep/yield/ could make it happen earlier (going to try)?
If /sys/class/rtc/rtc0/wakealarm works on this box, you can use it to trigger
resume in a loop.
Basically, you can do
# echo 0 > /sys/class/rtc/rtc0/wakealarm
# date +%s -d "+60 seconds" > /sys/class/rtc/rtc0/wakealarm
then go to suspend and it will resume the box in ~1 minute.
Thanks,
Rafael
next prev parent reply other threads:[~2009-08-31 19:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 8:41 [PATCH 1/1] Power: fix suspend vt regression Jiri Slaby
2009-08-11 17:00 ` Greg KH
2009-08-11 21:19 ` Jiri Slaby
2009-08-11 21:20 ` Jiri Slaby
2009-08-31 9:47 ` suspend race -next regression [Was: Power: fix suspend vt regression] Jiri Slaby
2009-08-31 19:32 ` Rafael J. Wysocki [this message]
2009-09-04 11:49 ` suspend race -mm " Jiri Slaby
2009-09-04 22:30 ` Jiri Slaby
2009-09-04 22:36 ` Jiri Slaby
2009-09-05 12:39 ` [-mm] warning during suspend [was: suspend race -mm regression] Jiri Slaby
2009-09-05 14:41 ` Xiao Guangrong
2009-09-10 20:57 ` Andrew Morton
2009-09-11 0:00 ` Suresh Siddha
2009-09-11 7:55 ` Xiao Guangrong
2009-09-09 11:41 ` [PATCH 1/1] sched: fix cpu_down deadlock Jiri Slaby
2009-09-09 11:53 ` Peter Zijlstra
2009-09-09 12:23 ` Jiri Slaby
2009-09-09 12:37 ` Peter Zijlstra
2009-09-09 13:46 ` Oleg Nesterov
2009-09-11 6:09 ` Lai Jiangshan
2009-09-11 6:28 ` Jiri Slaby
2009-09-11 7:38 ` Lai Jiangshan
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=200908312132.10904.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.