lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Attempted summary of suspend-blockers LKML thread, take three
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



\
 
 \ /
  Last update: 2010-08-17 17:03    [W:0.241 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site