<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 9:11 AM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 17.04.15 14:06, Matt Hoosier (<a href="mailto:matt.hoosier@gmail.com">matt.hoosier@gmail.com</a>) wrote:<br>
<br>
> The bootcharting that I do seems to show that about 1.2 - 1.5 sec are spent<br>
> internal to systemd before any external processes get run for the<br>
> particular embedded CPU I'm using. That gap is a killer at the moment.<br>
><br>
> I'm sure this is quite the naive question, but: is there a simple option I<br>
> can insert into my "super-important" first service that would cause all<br>
> other units to be forestalled until my service reports that it's<br>
> initialized? I.e., something like:<br>
><br>
>     [Unit]<br>
>     DefaultDependencies=no<br>
>     Before=very-first-normal-systemd-unit.service<br>
><br>
> I didn't have luck identifying such a<br>
> very-first-normal-systemd-unit.service on my own, but I'm admittedly rather<br>
> inexperienced poking around the internal default suite of units packaged<br>
> with systemd.<br>
<br>
</span>This is not available, though often requested. But I doubt this can<br>
ever work, since "running before 'everything'" or "running after<br>
'everything'" is not particularly usefully defined as this all breaks<br>
down as soon as you have two services that want to be run like this</blockquote><div><br></div><div>Okay, I appreciate that there's no built-in meta-unit that would permit me to say "start me to the exclusion of absolutely everything else." I agree that would fail the "what if two processes each tried to play that game?" test.</div><div><br></div><div>I was just hoping that some unit exists that is synonymous with "the point upon which all traditional systemd work is dependent." I suppose nothing still exists matching that kind of weaker description? E.g., ".slice" or something like that.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">.<br>
<br>
The right way is usually to simply add the right deps of the stuff you<br>
really want to be run before.<br>
<br>
That all said, I would be open to adding a "priority" concept to<br>
units: if we are about to fork off a large number of processes at the<br>
same time we do so sequentially but provide no control currently about<br>
the order then. I'd be open making this configurable with a priority<br>
values that can ensure we fork off some things before others when both<br>
are runnable. This would not really fix your issue, sicne it wouldn't<br>
really delay any other services, it would only configure the order of<br>
the fork()s, but they'd still take place in a tight loop.<br>
<div class="HOEnZb"><div class="h5"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</div></div></blockquote></div><br></div></div>