From: Andrew Morton <akpm@osdl.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>, LKML <linux-kernel@vger.kernel.org>,
Nigel Cunningham <ncunningham@linuxmail.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH -mm] swsusp: Freeze filesystems during suspend (rev. 2)
Date: Wed, 1 Nov 2006 13:21:21 -0800 [thread overview]
Message-ID: <20061101132121.3ef5716c.akpm@osdl.org> (raw)
In-Reply-To: <200611012127.17943.rjw@sisk.pl>
On Wed, 1 Nov 2006 21:27:17 +0100
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> On Wednesday, 1 November 2006 20:45, Andrew Morton wrote:
> > On Wed, 1 Nov 2006 18:53:07 +0100
> > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
> > > +void thaw_processes(void)
> > > +{
> > > + printk("Restarting tasks ... ");
> > > + __thaw_tasks(FREEZER_KERNEL_THREADS);
> > > + thaw_filesystems();
> > > + __thaw_tasks(FREEZER_USER_SPACE);
> > > + schedule();
> > > + printk("done.\n");
> > > +}
> > >
> > > - read_unlock(&tasklist_lock);
> > > +void thaw_kernel_threads(void)
> > > +{
> > > + printk("Restarting kernel threads ... ");
> > > + __thaw_tasks(FREEZER_KERNEL_THREADS);
> > > schedule();
> > > printk("done.\n");
> > > }
> >
> > what do these random-looking schedule()s do??
>
> My understanding is that they allow the thawed tasks to actually exit
> the refrigerator, because __thaw_tasks() only changes their states.
I'd be surprised if this is doing what we thing it's doing. Calling
schedule() in state TASK_RUNNING is usually a no-op. It'll only actually
switch to another task if the scheduler decides that this task has expired
its timeslice, or another higher-priority task has become runnable, etc.
next prev parent reply other threads:[~2006-11-01 21:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 11:00 [PATCH -mm] swsusp: Freeze filesystems during suspend Rafael J. Wysocki
2006-11-01 11:47 ` Pavel Machek
2006-11-01 12:05 ` Rafael J. Wysocki
2006-11-01 17:53 ` [PATCH -mm] swsusp: Freeze filesystems during suspend (rev. 2) Rafael J. Wysocki
2006-11-01 19:45 ` Andrew Morton
2006-11-01 20:27 ` Rafael J. Wysocki
2006-11-01 21:21 ` Andrew Morton [this message]
2006-11-02 20:53 ` Rafael J. Wysocki
2006-11-01 19:54 ` Andrew Morton
2006-11-01 20:22 ` Rafael J. Wysocki
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=20061101132121.3ef5716c.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox