Re: Re: [PATCH] Remove process freezer from suspend to RAM pathway
flat view
From: Rafael J. Wysocki <hidden>
Date: 2007-07-06 07:08:47
Also in:
lkml
On Friday, 6 July 2007 00:04, Pavel Machek wrote:
Hi!quoted
quoted
quoted
quoted
quoted
quoted
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.Yes, we are claiming fuse is very special in this regard, and perhaps even broken. Let's see. If I SIGSTOP the fuse server, I can get unrelated tasks unkillable (even for SIGKILL!) forever.Actually fuse allows SIGKILL, because it's always fatal, and the syscall may not be restarted.Okay, and you should handle refrigerator in the same paths where you handle SIGKILL. Just add try_to_freeze() there...
In fact the problem is more complicated than that, because some tasks may be waiting on VFS locks related to FUSE. Greetings, Rafael -- "Premature optimization is the root of all evil." - Donald Knuth