Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: "Michał Górny" <mgorny@g.o>, 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 17:06:03
Message-Id: 790e03dd-610c-7c85-4d78-a8434c83b1ee@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Enable FEATURES=parallel-install by default (bug 715110) by "Michał Górny"
1 On 5/12/20 3:39 AM, Michał Górny wrote:
2 > W dniu wto, 12.05.2020 o godzinie 01∶40 -0700, użytkownik Zac Medico
3 > napisał:
4 >> On 5/11/20 10:54 PM, Michał Górny wrote:
5 >>> W dniu nie, 10.05.2020 o godzinie 21∶32 -0700, użytkownik Zac
6 >>> Medico
7 >>> napisał:
8 >>>> The feature enables finer grained locks for install operations,
9 >>>> and
10 >>>> everyone agrees that it's safe to enable by default.
11 >>>
12 >>> Who's 'everyone' and where's their analysis of the problem?
13 >>> The manpage doesn't really help understand what this does, exactly.
14 >>
15 >> Before parallel-install there was just one big lock, so only one
16 >> package
17 >> slot could enter the merge/unmerge state at a given time.
18 >>
19 >> With parallel install, there are a few finer-grained locks that come
20 >> into play. [...]
21 >
22 > I'm sorry but I was asking of a more high-level implications.
23 >
24 > I presume that this means that more than files of more than one package
25 > can be merged simultaneously. However:
26
27 No, an exclusive lock must be held on vardbapi._fs_lock for this. This
28 is currently required at least to guarantee that access to the config
29 memory file is serialized (config memory is the thing that emerge
30 --noconfmem disables, but --noconfmem does not disable this lock).
31
32 We assume that it's probably not worthwhile to try to merge files for
33 more than one package at a time, since that would cause them to compete
34 for IO bandwidth.
35
36 > 1. Are collisions handled correctly then? i.e. if you start installing
37 > A, and then B, and the two packages collide will portage fail before
38 > starting to install any file from B?
39
40 There are no guarantees here. However, the risk is minimal, since it's
41 unlikely that a file collision of this sort would occur. file collisions
42 are a QA problem that is generally detected and corrected log before we
43 would encounter a collision of this sort.
44
45 > 2. Are preinst/postinst phases called simultaneously or serialized?
46
47 They're serialized.
48 --
49 Thanks,
50 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies