Re: swsusp regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton napsal(a):
> On Tue, 04 Jul 2006 01:50:09 +0159
> Jiri Slaby <[email protected]> wrote:
> 
>> Andrew Morton napsal(a):
>>> On Tue, 04 Jul 2006 00:53:02 +0159
>>> Jiri Slaby <[email protected]> wrote:
>>>
>>>> Jiri Slaby napsal(a):
>>>>> 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
>>>>
>>>>> 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?
>> 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,
-- 
Jiri Slaby        www.fi.muni.cz/~xslaby/
\_.-^-._   [email protected]   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
<a href="http://www.fi.muni.cz/~xslaby/";>Jiri Slaby</a>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux