Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753512Ab0HQPAU (ORCPT ); Tue, 17 Aug 2010 11:00:20 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:38906 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750837Ab0HQPAS (ORCPT ); Tue, 17 Aug 2010 11:00:18 -0400 Date: Tue, 17 Aug 2010 11:00:17 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Rafael J. Wysocki" cc: Jesse Barnes , Brian Swetland , Felipe Contreras , "Ted Ts'o" , , Alan Cox , , , , , , , , , , , , , , , , Subject: Re: Attempted summary of suspend-blockers LKML thread, take three In-Reply-To: <201008171518.14069.rjw@sisk.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1520 Lines: 31 On Tue, 17 Aug 2010, Rafael J. Wysocki wrote: > > In general, we try to keep such complexity out of the > > kernel, but not always; there are compelling cases for putting > > complexity in the kernel to provide uniformity and flexibility (e.g. > > application state save/restore vs. system-wide checkpoints, the former > > preserves the "if it can be done outside the kernel, it should be", > > while the latter provides much greater flexibility and avoids the need > > to port applications to potentially incompatible or unportable state > > saves/restore libraries). > > I understand that and IMO it should be decided on the case-by-case basis. > In this particular case, however, I don't think it's appropriate to use the > interface designed with user space in mind for implementing a kernel-based > mechanism. Putting the "opportunistic suspend" loop into the kernel doesn't save as much as one might think. The loop itself is quite simple, and the task switch it entails is required in any case (since suspend must be carried out within a process context). Putting it in the kernel would save a few user/kernel context switches, not enough to matter IMO. And it wouldn't offer any greater flexibility -- it might even cut down the flexibility. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/