From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D3B5386EC52; Fri, 12 Mar 2021 12:35:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D3B5386EC52 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/27557] Use threading at sub-file level Date: Fri, 12 Mar 2021 12:35:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 12:35:38 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27557 --- Comment #3 from Tom de Vries --- An interesting question is whether find_dups can be parallelized. The common resource that is used, is the dup_htab. For an actual insertion,= the htab as a whole needs to be locked. For comparing, comparing DIEs with different checksums can be done in paral= lel.=20 So, we could fold the ref_checksum to a byte, and use that as in index into= an array of 256 locks. The problem however is the optimistic marking of DIEs = as duplicates when following references. Marking those optimistically would a= lso require acquiring the lock for the corresponding checksum, which opens the = door to deadlock problems. We could mitigate for that by detecting cycles upfron= t, and avoiding parallel processing of those, but that would again reduce effectivity. --=20 You are receiving this mail because: You are on the CC list for the bug.=