RE: -mm swsusp: do not default to platform/firmware

From: Li, Shaohua
Date: Thu Jul 29 2004 - 00:21:25 EST



Hi,

>-----Original Message-----
>From: linux-kernel-owner@xxxxxxxxxxxxxxx [mailto:linux-kernel-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Nigel Cunningham
>Sent: Thursday, July 29, 2004 8:30 AM
>To: Pavel Machek
>Cc: Andrew Morton; Patrick Mochel; akpm@xxxxxxxxxx; Linux Kernel
Mailing
>List
>Subject: Re: -mm swsusp: do not default to platform/firmware
>
>Hi.
>
>On Thu, 2004-07-29 at 09:43, Pavel Machek wrote:
>> +I did found some kernel threads don't do it, and they don't freeze,
and
>
>"I found... threads that don't..."
>
>> +so the system can't sleep. Is this a known behavior?
>> +
>> +A: All such kernel threads need to be fixed, one by one. Select
place
>> +where it is safe to be frozen (no kernel semaphores should be held
at
>> +that point and it must be safe to sleep there), and add:
>> +
>> + if (current->flags & PF_FREEZE)
>> + refrigerator(PF_FREEZE);
>> +
>
>Perhaps you should also add.
>
>If the thread is needed for writing the image to storage, you should
>instead set the PF_NOFREEZE process flag when creating the thread.
>
You know for sleep into mem (s3) we also use
'freeze_processes/refrigerator', and the threads don't write image to
storage for S3. Should the threads be set the PF_NOFREEZE? Is there any
side effect for S3 if the threads are running?

Thanks,
Shaohua


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/