[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130211105314.GA32322@amd.pavel.ucw.cz>
Date: Mon, 11 Feb 2013 11:53:14 +0100
From: Pavel Machek <pavel@....cz>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Miklos Szeredi <miklos@...redi.hu>,
Goswin von Brederlow <goswin-v-b@....de>,
Li Fei <fei.li@...el.com>, len.brown@...el.com,
mingo@...hat.com, peterz@...radead.org, biao.wang@...el.com,
linux-pm@...r.kernel.org, fuse-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, chuansheng.liu@...el.com
Subject: Re: Getting rid of freezer for suspend [was Re: [fuse-devel]
[PATCH] fuse: make fuse daemon frozen along with kernel threads]
Hi!
> > > > > > The whole memory shrinking we do for hibernation is now done by allocating
> > > > > > memory, so the freezer is not necessary for *that* and there's *zero*
> > > > > > difference between suspend and hibernation with respect to why the freezer is
> > > > > > used.
> > > > >
> > > > > Funny. Freezer was put there so that hibernation image was safe to
> > > > > write out. You need disk subsystems in workable state for hibernation.
> > > >
> > > > I'm not really sure what you're talking about. Why do you think the freezer is
> > > > necessary for that?
> >
> > Well, from freezer you need:
> >
> > 1) user process frozen.
> >
> > 2) essential locks _not_ held so that block devices are still functional.
> >
> > > > > mmap... what is problem with mmap? For suspend, memory is powered, so
> > > > > you can permit people changing it.
> > > >
> > > > Suppose mmap is used to make the registers of some device available to user
> > > > space. Yes, that can happen.
> >
> > "Don't do it, then". Yes, can happen, but hopefully is not too common
> > these days. [And... freezer doing 1) but not 2) would be enough to
> > handle that. Freezer doing 1) but not 2) would also be simpler...]
>
> Again, I'm not sure what you mean.
>
> Are you trying to say that it would be OK to freeze user space tasks in
> the D state?
Yes. For suspend, that should pretty much work. (With caveats, as
Miklos noticed).
Unfortunately, that is not going to be too easy for hibernation.
We could mae the situation easier by specifying we only support
hibernation to local SATA or SCSI disk, not over NBD, iSCSI,
etc... That would reduce number of locks that need to be available for
hibernation.
Unfortunately, uswsusp did not make that easy as userland may want to
do arbitrary stuff with the image.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists