Re: [PATCH 08/17] blkcg: shoot down blkio_groups on elevator switch

From: Lennart Poettering
Date: Mon Jan 23 2012 - 15:40:17 EST


On Mon, 23.01.12 13:27, Vivek Goyal (vgoyal@xxxxxxxxxx) wrote:

> > Why can't systemd order elevator switch before other actions?
>
> Because systemd does not know. For systemd it is just launching services
> and what services are doing is not known to systemd.
>
> I think systemd does have some facilities so that services can express
> dependency on other services and dependent service blocks on completion
> of service it is depenent on. So may be in this case any service dealing
> with cgroups shall have to be dependent on this service which tunes
> the system and changes elevator.
>
> CCing lennart for more info on systemd.

Yes, the dependency logic is quite elaborate in systemd. If a service
really needs to it can plug itself into the early-boot phase, instead of
normal boot. It's where we usually load drivers via udev and apply
sysctl and these things, hence before any of the "real" services. So far
only udev itself (and plymouth in some way) are of this special kind
that run this early, but other services may move themselves this
early as well, if they want to.

Note that sticking code in the early boot phase means you need to know
what you do, i.e. not rely on device nodes being there, drivers probed,
access modes fixed, temporary files set up and so on, after all it's
where we do all those things in the first place. You can order yourself
individually after those tasks however, if needed.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/