linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Goswin von Brederlow <goswin-v-b@web.de>,
	Miklos Szeredi <miklos@szeredi.hu>, Li Fei <fei.li@intel.com>,
	len.brown@intel.com, mingo@redhat.com, peterz@infradead.org,
	biao.wang@intel.com, linux-pm@vger.kernel.org,
	fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	chuansheng.liu@intel.com
Subject: Getting rid of freezer for suspend [was Re: [fuse-devel] [PATCH] fuse: make fuse daemon frozen along with kernel threads]
Date: Sun, 10 Feb 2013 11:33:45 +0100	[thread overview]
Message-ID: <20130210103344.GA8888@amd.pavel.ucw.cz> (raw)
In-Reply-To: <1595169.zvx3Wi6SMv@vostro.rjw.lan>

Hi!

> > > For shutdown in userspace there is the sendsigs.omit.d/ to avoid the
> > > problem of halting/killing processes of the fuse filesystems (or other
> > > services) prematurely. I guess something similar needs to be done for
> > > freeze. The fuse filesystem has to tell the kernel what is up.
> > 
> > Would it be feasible to create some kind of fuse-stop-script.sh, and
> > run it before suspend (from userspace)? It should be pretty similar to
> > sendsigs.omit.d/ mechanism AFAICT.
> > 
> > I'm sorry, freezer is not too suitable for fuse.
> > 
> > (BTW: for suspend, we may be able to improve it so that it is possible
> > to remove freezer from it. For hibernation, it would be very hard.)
> 
> Well, this is so incorrect that it's not even funny. :-(
> 
> 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.

> And *the* reason why it's used is that intercepting all of the possible ways
> user space could interfere with the suspend process without the freezer is
> simply totally impractical.  System calls (including ioctls and
> fctls),

It is a lot of work, agreed. But runtime power management is already
moving in that direction. And I could imagine introducing "big suspend
lock" to be grabbed pretty much everywhere.

(And IIRC n900 pretty much suspends when idle.)

> sysfs accesses, /proc accesses, debugfs, to name a few, and mmap (I wonder how
> you would handle *that* alone).  And I'm sure there's more I didn't
> even

mmap... what is problem with mmap? For suspend, memory is powered, so
you can permit people changing it.

> So please don't tell people that something is doable while it practically
> realisticly isn't.

I can imagine doing that for suspend, and believe we are moving in
that direction with runtime suspend. For hibernation, we need to write
image the image to the disk (which is the important difference, not
memory shrinking), and "big suspend lock" would interfere with
that. I can not imagine reasonable solution for that.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2013-02-10 10:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06  1:11 [PATCH] fuse: make fuse daemon frozen along with kernel threads Li Fei
2013-02-06  9:27 ` Miklos Szeredi
     [not found]   ` <20130207084144.GB6168@frosties>
2013-02-07  9:59     ` [fuse-devel] " Miklos Szeredi
2013-02-08 14:11       ` Goswin von Brederlow
2013-02-09 17:49         ` Pavel Machek
2013-02-09 20:31           ` Rafael J. Wysocki
2013-02-10 10:33             ` Pavel Machek [this message]
2013-02-10 13:51               ` Getting rid of freezer for suspend [was Re: [fuse-devel] [PATCH] fuse: make fuse daemon frozen along with kernel threads] Rafael J. Wysocki
2013-02-10 14:22                 ` Rafael J. Wysocki
2013-02-10 18:55                   ` Pavel Machek
2013-02-10 23:31                     ` Rafael J. Wysocki
2013-02-11 10:11                       ` Miklos Szeredi
2013-02-11 12:08                         ` Rafael J. Wysocki
2013-02-11 13:59                           ` Miklos Szeredi
2013-02-11 19:28                             ` Rafael J. Wysocki
2013-02-12 10:46                             ` Pavel Machek
2013-02-12 13:13                               ` Miklos Szeredi
2013-02-12 13:17                                 ` Miklos Szeredi
2013-02-13 17:34                                   ` Miklos Szeredi
2013-02-13 20:16                                     ` Pavel Machek
2013-02-14 10:31                                       ` Miklos Szeredi
2013-02-13 21:21                                     ` Rafael J. Wysocki
2013-02-14 10:41                                       ` Miklos Szeredi
2013-02-14 12:11                                         ` Rafael J. Wysocki
2013-02-14 13:09                                           ` Miklos Szeredi
2013-02-14 17:38                                             ` Rafael J. Wysocki
2013-02-18  6:26                                               ` Li, Fei
2013-02-18 12:26                                                 ` Rafael J. Wysocki
2013-02-19 10:46                                                   ` Pavel Machek
2013-02-20  2:54                                                     ` Li, Fei
2013-02-20 13:13                                                       ` [fuse-devel] Getting rid of freezer for suspend [was " Miklos Szeredi
2013-02-11 10:53                       ` Getting rid of freezer for suspend [was Re: [fuse-devel] " Pavel Machek
2013-02-06  9:56 ` [fuse-devel] [PATCH] fuse: make fuse daemon frozen along with kernel threads Han-Wen Nienhuys
2013-02-06 14:59   ` Miklos Szeredi

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=20130210103344.GA8888@amd.pavel.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=biao.wang@intel.com \
    --cc=chuansheng.liu@intel.com \
    --cc=fei.li@intel.com \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=goswin-v-b@web.de \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).