From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 1989B3858D28 for ; Tue, 27 Jun 2023 14:09:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1989B3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id E4EA030146AC; Tue, 27 Jun 2023 16:09:33 +0200 (CEST) Received: by r6.localdomain (Postfix, from userid 1000) id 6D7933401FA; Tue, 27 Jun 2023 16:09:33 +0200 (CEST) Message-ID: Subject: Re: Performance issue with systemd-coredump and container process linking 2000 shared libraries. From: Mark Wielaard To: Romain GEISSLER Cc: "elfutils-devel@sourceware.org" , Francois RIGAULT Date: Tue, 27 Jun 2023 16:09:33 +0200 In-Reply-To: <3465f95ee22b1ac433f1268f113e3813430be70a.camel@klomp.org> References: <20230614133920.10-1-romain.geissler@amadeus.com> <20230620213701.GN24233@gnu.wildebeest.org> <754003F4-3708-4C9C-AA30-EB76DAECF059@amadeus.com> <3465f95ee22b1ac433f1268f113e3813430be70a.camel@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3 (3.48.3-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-3028.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On Wed, 2023-06-21 at 18:24 +0200, Mark Wielaard wrote: > libelf: Replace list of elf_getdata_rawchunk results with a > tree >=20 > elf_getdata_rawchunks did a linear search to see if a chunk was > already fetched. Replace this list with a binary search tree to make > lookup faster when a lot of Elf_Data_Chunk were created. >=20 > * libelf/libelfP.h (Elf_Data_Chunk): Remove next field. > (struct Elf): Change the rawchunks type from Elf_Data_Chunk * > to void *. > * elf_getdata_rawchunk.c (chunk_compare): New static function. > (elf_getdata_rawchunk): Use tsearch instead of a manual linked > list. > * elf_end.c (free_chunk): New static function. > (elf_end): Call tdestroy instead of walking linked list. I pushed this now. It is also in Fedora Rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1026cbdd9a But there are some gating issues (nothing to do with the new code though, it seems to be dnf5/annobin/rpminspect issues). I'll try to also push it to centos stream. Cheers, Mark