Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway

From: Oliver Neukum
Date: Thu Jul 05 2007 - 04:48:54 EST


Am Donnerstag, 5. Juli 2007 schrieb Miklos Szeredi:
> > > > > > I have discussed the benefits elsewhere. ÂAs for the deadlocks -- do
> > > > > > you still observe them if you use the version of the freezer which
> > > > > > doesn't freeze kernel threads?
> > > > >
> > > > > In general the only way to guarantee there are no deadlocks is to
> > > > > construct the graph of dependencies between tasks. ÂThose dependencies
> > > > > are not in practice observable from outside the tasks, so it is
> > > > > virtually impossible to construct the graph.
> > > >
> > > > In which way can user space tasks depend on each other in a way that
> > > > allows a them members of that cycle to be in uninterruptible sleep?
> > >
> > > Â- process A calls rename() on a fuse fs
> > > Â- process B, the fuse server, starts to process the rename request
> > > Â- process B is frozen before it can reply
> > >
> > > Now process A is unfreezable. ÂWe cannot make rename() restartable,
> > > hence it cannot be interruptible.
> >
> > Then this is a problem specific to fuse. You should teach fuse to block
> > suspension while such operations are being performed.
>
> And teach VFS to block suspension, while waiting on a mutex held by
> another process performing a fuse operation.
>
> I can already hear the beautiful praise from Al Viro at the sight of
> that ;)

There is that.

OK, bite the bullet. Tasks involved in fuse are special. Give them a flag
and teach the freezer to put them on ice only after all other task are
frozen. In a way they are kernel, there's no use denying that.

Regards
Oliver

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/