[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1I5gSu-0003f4-00@dorka.pomaz.szeredi.hu>
Date: Tue, 03 Jul 2007 13:22:40 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: oliver@...kum.org
CC: miklos@...redi.hu, linux-pm@...ts.linux-foundation.org,
benh@...nel.crashing.org, nigel@...el.suspend2.net,
mjg59@...f.ucam.org, linux-kernel@...r.kernel.org
Subject: Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway
> > > > So to summarize, the plan that makes things work with fuse is:
> > > >
> > > > - For STR, don't do the freezer thing.
> > > >
> > > > - For STD, don't sys_sync() after you froze
> > > >
> > > > There might be -other- issues, but that should get you through some of
> > >
> > > At the risk of repeating myself. Character device drivers are written
> > > with the assumption that normal io and suspend/resume do not race
> > > with each other due to the freezer.
> > > What do you intend to do about that?
> >
> > Oliver, can you please explain your worries in a bit more detail?
> >
> > I don't claim to know anything about how STR or hibernate works, but
> > neither seem to have any problem with I/O on the fuse device "racing"
> > with them.
>
> The problem is not with fuse. The problem is generic in nature.
>
> If you remove the freezer, user space remains active until the last CPU
> goes into suspend. It can do syscalls. Or do you know a clean way to exempt
> only the tasks fuse might use?
You are talking about hibernate, right? Suspending (to ram) is
instantaneous, in that _after_ suspend no CPU is active obviously.
> Now device drivers have a guaranteed temporal sequence:
>
> last io -> suspend() -> resume() [or disconnect()] -> new io
>
> This is because suspend() is called after the freezer goes into action. If
> you remove the freezer, you need to deal with
>
> 1. io to suspended devices
> 2. resume() assuming that the device is in the state suspend() left it
> 3. io changing a device's state while suspend is saving it
>
> and you need to fix this for all device drivers, not just those fuse is
> involved with. Removing the freezer means doing a more or less full
> audit of every driver and additional locking in many drivers.
OK, this has _nothing_ at all to do with fuse then, and everything to
do with disk I/O.
Just because fuse is a filesystem, it doesn't have to do anything with
block devices, just like procfs doesn't either.
So removing the freezer from the hibernate path would be problematic,
but as I understand this is not what has been proposed, only removing
the freezer from the STR path, which should be OK.
Miklos
-
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