[Pm-utils] [PATCH 1/6] Split hook running into two phases -- core and aux

Victor Lowther victor.lowther at gmail.com
Wed Jun 4 16:05:34 PDT 2008


On Wed, 2008-06-04 at 11:49 +0200, Stefan Seyfried wrote:
> Victor Lowther wrote:
> > Fair enough, although we should define some critical points in the
> > sequence (e.g. after ?? don't rely on modules being loaded, etc), and
> > mabye shuffle the hook ordering around a bit (for example, the ordering
> > of 50modules to 65alsa is obviously wrong).
> > 
> > As a starting point, how about the following convention:
> > 
> > 00 - 49: user and (most) package supplied hooks that can assume that all
> > of the usual services and userspace infrastructure is still running.
> > 
> > 50 - 74: service-handling hooks (mainly stopping and starting services,
> > saving any state they may need, etc)
> > 
> > 75 - 89: module and non-core hardware handling (usb, audio, network,
> > etc).
> > 
> > 90 - 99: reserved for critical pre-suspend hooks, starting with 90chvt
> > and 90modules and ending with 99video
> > 
> > At or before 50, you can assume that all services are still enabled.
> > 
> > At or before 75, you can assume that all modules are still loaded.
> 
> I'd say this is seriously overengineered.
> Hooks that depend on having certain modules unloaded should just unload them
> by themselves.
> The SUSPEND_MODULES hack is only to let users add broken modules. In general,
> distributions should always ship with an empty SUSPEND_MODULES and just fix
> their kernel.
> 
> Remember: almost all of those hooks are only workarounds for breakage that
> needs to be properly fixed anyway. So with that convention you are only
> encouraging people to write sophisticated hooks instead of fixing the real
> issue. This is fundamentally wrong and contradicts the original goal of the
> project IMVHO.
> 
> Even though it was written with networking in mind, i found that rfc1925
> pretty much describes all the problems with this approach ;)

You are missing the point, which is to give hook writers and distro
maintainers an idea as to where in the hook sequence their hook should
go, and to make sure that sequence is not likely to cause odd breakages.
Right now there is no such guidance.

-- 
Victor Lowther
Ubuntu Certified Professional



More information about the Pm-utils mailing list