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

From: Pavel Machek (pavel_at_ucw.cz)
Date: 07/29/04

  • Next message: Pavel Machek: "Re: -mm swsusp: do not default to platform/firmware"
    Date:	Thu, 29 Jul 2004 09:39:29 +0200
    To: Nigel Cunningham <ncunningham@linuxmail.org>
    
    

    Hi!

    > > +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.

    Thanks, text is now:

    Q: Kernel thread must voluntarily freeze itself (call 'refrigerator'). But
    I found some kernel threads that don't do it, and they don't freeze, and
    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);

    If the thread is needed for writing the image to storage, you should
    instead set the PF_NOFREEZE process flag when creating the thread.

    I'll eventually push it, too.
                                                                    Pavel

    -- 
    People were complaining that M$ turns users into beta-testers...
    ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Pavel Machek: "Re: -mm swsusp: do not default to platform/firmware"