Skip to contentSkip to conversation

swsusp regression

DISCUSSION Jiri Slaby 3 participants 9 messages Jul 3, 2006 – Jul 4, 2006

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

It was working just perfect in 2.6.17-rcX-mmXs, but from 2.6.17-mmX times (maybe X>=3) it doesn't sleep anymore -- I may be lucky sometimes, and it is successful also in 2.6.17-mm5, but most time everything I get is Freezing and nothing is frozen but fishes in my fridge.

regards,

Signature · 3 lines
Jiri Slaby         www.fi.muni.cz/~xslaby
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
#1 lore raw

Hi!

Quoted 2 lines

when suspending machine with hyperthreading, only Freezing cpus appears and then it loops somewhere.

Does it fail to freeze, or just lock up at that point?

Does it work okay in UP mode?

Quoted 9 lines

I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

It was working just perfect in 2.6.17-rcX-mmXs, but from 2.6.17-mmX times (maybe X>=3) it doesn't sleep anymore -- I may be lucky sometimes, and it is successful also in 2.6.17-mm5, but most time everything I get is Freezing and nothing is frozen but fishes in my fridge.

:-).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#2 lore raw

Pavel Machek napsal(a):

Quoted 6 lines

Hi!

Quoted 2 lines

when suspending machine with hyperthreading, only Freezing cpus appears and then it loops somewhere.

Does it fail to freeze, or just lock up at that point?

It loops, cpu is 100 % working, fans can be heard as they try to cool cpu with absolutely no feedback to keyboard except sysrq.

Quoted 2 lines

Does it work okay in UP mode?

What does UP mode stands for? UniProcessor, i.e. turn HT off?

thanks,

Signature · 4 lines
Jiri Slaby        www.fi.muni.cz/~xslaby/
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
<a href="http://www.fi.muni.cz/~xslaby/">Jiri Slaby</a>
author
#3 lore raw
In reply to Pavel Machek

Pavel Machek napsal(a):

Quoted 8 lines

Hi!

Quoted 2 lines

when suspending machine with hyperthreading, only Freezing cpus appears and then it loops somewhere.

Does it fail to freeze, or just lock up at that point?

Does it work okay in UP mode?

Seems to be fine. Going to try restore stopmachine from 2.6.17...

regards,

Signature · 4 lines
Jiri Slaby        www.fi.muni.cz/~xslaby/
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
<a href="http://www.fi.muni.cz/~xslaby/">Jiri Slaby</a>
author
#4 lore raw
In reply to Jiri Slaby

Jiri Slaby napsal(a):

Quoted 3 lines

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then

Note: suspending to disk; done by:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

Quoted 4 lines

it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

One more from some previous kernels (cutted sysrq-t):
http://www.fi.muni.cz/~xslaby/sklad/22062006046.jpg

regards,

Signature · 3 lines
Jiri Slaby         www.fi.muni.cz/~xslaby
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
#5 lore raw
Quoted 9 lines · On Tue, 04 Jul 2006 00:53:02 +0159 Jiri Slaby <[email protected]> wrote:

Jiri Slaby napsal(a):

Quoted 3 lines

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then

Note: suspending to disk; done by:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

Quoted 8 lines
Quoted 4 lines

it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

One more from some previous kernels (cutted sysrq-t):
http://www.fi.muni.cz/~xslaby/sklad/22062006046.jpg

If you replace kernel/stop_machine.c with the version from 2.6.17, does it help?

author
#6 lore raw

Andrew Morton napsal(a):

Quoted 15 lines
Quoted 12 lines · On Tue, 04 Jul 2006 00:53:02 +0159 Jiri Slaby <[email protected]> wrote:

Jiri Slaby napsal(a):

Quoted 3 lines

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then

Note: suspending to disk; done by:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

Quoted 4 lines

it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

Quoted 6 lines
Quoted 3 lines

One more from some previous kernels (cutted sysrq-t):
http://www.fi.muni.cz/~xslaby/sklad/22062006046.jpg

If you replace kernel/stop_machine.c with the version from 2.6.17, does it help?

Yup. It seems so.

regards,

Signature · 4 lines
Jiri Slaby        www.fi.muni.cz/~xslaby/
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
<a href="http://www.fi.muni.cz/~xslaby/">Jiri Slaby</a>
#7 lore raw
Quoted 16 lines · On Tue, 04 Jul 2006 01:50:09 +0159 Jiri Slaby <[email protected]> wrote:

Andrew Morton napsal(a):

Quoted 15 lines
Quoted 12 lines · On Tue, 04 Jul 2006 00:53:02 +0159 Jiri Slaby <[email protected]> wrote:

Jiri Slaby napsal(a):

Quoted 3 lines

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then

Note: suspending to disk; done by:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

Quoted 4 lines

it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

One more from some previous kernels (cutted sysrq-t):
http://www.fi.muni.cz/~xslaby/sklad/22062006046.jpg

If you replace kernel/stop_machine.c with the version from 2.6.17, does it help?

Yup. It seems so.

OK. I don't see what the problem is - let's just revert it.

author
#8 lore raw

Andrew Morton napsal(a):

Quoted 22 lines
Quoted 19 lines · On Tue, 04 Jul 2006 01:50:09 +0159 Jiri Slaby <[email protected]> wrote:

Andrew Morton napsal(a):

Quoted 18 lines
Quoted 15 lines · On Tue, 04 Jul 2006 00:53:02 +0159 Jiri Slaby <[email protected]> wrote:

Jiri Slaby napsal(a):

Quoted 3 lines

Hello,

when suspending machine with hyperthreading, only Freezing cpus appears and then

Note: suspending to disk; done by:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

Quoted 4 lines

it loops somewhere. I tried to catch some more info by pressing sysrq-p. Here are some captures:
http://www.fi.muni.cz/~xslaby/sklad/03072006074.gif
http://www.fi.muni.cz/~xslaby/sklad/03072006075.gif

One more from some previous kernels (cutted sysrq-t):
http://www.fi.muni.cz/~xslaby/sklad/22062006046.jpg

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

If you replace kernel/stop_machine.c with the version from 2.6.17, does it help?

Yup. It seems so.

OK. I don't see what the problem is - let's just revert it.

I dag into that deeply and:
struct task_struct *__stop_machine_run(int (*fn)(void *), void *data,
unsigned int cpu)
{
[...]

        p = kthread_create(do_stop, &smdata, "kstopmachine");
        if (!IS_ERR(p)) {
                kthread_bind(p, cpu);
                wake_up_process(p);
                wait_for_completion(&smdata.done);

[...]
So here the thread is created and kernel waits for completion. OK.

static int do_stop(void *_smdata)
{
[...]

        /* We're done: you can kthread_stop us now */
        complete(&smdata->done);

This is called, some work is done, so call complete:
void fastcall complete(struct completion *x)

{
        unsigned long flags;

        spin_lock_irqsave(&x->wait.lock, flags);
        x->done++;
        __wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,
                         1, 0, NULL);
        spin_unlock_irqrestore(&x->wait.lock, flags);
}

Nice, but spin_unlock_irqrestore never returns -- it loops in preempt_enable(), why? Is TIF_NEED_RESCHED set all the time? Wouldn't be this the culprit?

regards,

Signature · 4 lines
Jiri Slaby        www.fi.muni.cz/~xslaby/
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
<a href="http://www.fi.muni.cz/~xslaby/">Jiri Slaby</a>