Re: s6 init-stage1

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Tue, 06 Jan 2015 13:48:33 +0100

On 06/01/2015 13:12, Peter Pentchev wrote:
> Even better: most modern systems have a tsort(1) utility for this kind of
> topological sorting; BSD-derived systems have had it for ages.

  Interesting. Thanks for the heads-up - I had heard of tsort, but didn't
know exactly what it does.

  However, I'd like a tool that knows what steps it can parallelize.
A sequential output is great for functions name in a piece of code,
but for services, the point is to start as many as possible in
parallel, and minimize the amount of synchronization points.

For instance, given
1 2
3 4
meaning 2 should happen after 1, and 4 should happen after 3,
tsort gives
1
3
2
4
but instead, I need something like
1 3
2 4
because 1 and 3 can happen in parallel, and same for 2 and 4.

  AFAICT, tsort cannot do that. (make might not be able to either,
but since it's more complex, it's harder to tell.)

-- 
  Laurent
Received on Tue Jan 06 2015 - 12:48:33 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC