Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] Enable FEATURES=parallel-install by default (bug 715110)
Date: Tue, 12 May 2020 19:28:57
Message-Id: a3930bb8f8b2606db72cfd79113aed1974f3f5ca.camel@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Enable FEATURES=parallel-install by default (bug 715110) by Zac Medico
1 W dniu wto, 12.05.2020 o godzinie 10∶05 -0700, użytkownik Zac Medico
2 napisał:
3 > On 5/12/20 3:39 AM, Michał Górny wrote:
4 > > I'm sorry but I was asking of a more high-level implications.
5 > >
6 > > I presume that this means that more than files of more than one
7 > > package
8 > > can be merged simultaneously. However:
9 >
10 > No, an exclusive lock must be held on vardbapi._fs_lock for this.
11 > This
12 > is currently required at least to guarantee that access to the config
13 > memory file is serialized (config memory is the thing that emerge
14 > --noconfmem disables, but --noconfmem does not disable this lock).
15 >
16 > We assume that it's probably not worthwhile to try to merge files for
17 > more than one package at a time, since that would cause them to
18 > compete
19 > for IO bandwidth.
20 >
21 > > 1. Are collisions handled correctly then? i.e. if you start
22 > > installing
23 > > A, and then B, and the two packages collide will portage fail
24 > > before
25 > > starting to install any file from B?
26 >
27 > There are no guarantees here. However, the risk is minimal, since
28 > it's
29 > unlikely that a file collision of this sort would occur. file
30 > collisions
31 > are a QA problem that is generally detected and corrected log before
32 > we
33 > would encounter a collision of this sort.
34 >
35 > > 2. Are preinst/postinst phases called simultaneously or serialized?
36 >
37 > They're serialized.
38
39 Now I'm lost here. Could you try to explain to me, without getting
40 into the deep technicalities, how parallel-install achieves better
41 speed or at doing what is non-parallel-install so slow?
42
43 --
44 Best regards,
45 Michał Górny

Replies