From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759708AbXGEIsx (ORCPT ); Thu, 5 Jul 2007 04:48:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758036AbXGEIso (ORCPT ); Thu, 5 Jul 2007 04:48:44 -0400 Received: from smtp-out001.kontent.com ([81.88.40.215]:57024 "EHLO smtp-out.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757793AbXGEIsn convert rfc822-to-8bit (ORCPT ); Thu, 5 Jul 2007 04:48:43 -0400 From: Oliver Neukum To: Miklos Szeredi Subject: Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway Date: Thu, 5 Jul 2007 10:48:45 +0200 User-Agent: KMail/1.9.7 Cc: paulus@samba.org, stern@rowland.harvard.edu, johannes@sipsolutions.net, rjw@sisk.pl, linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org, pavel@ucw.cz, mjg59@srcf.ucam.org, benh@kernel.crashing.org References: <18059.10554.955290.148535@cargo.ozlabs.ibm.com> <200707051024.23528.oliver@neukum.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200707051048.46202.oliver@neukum.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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