From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xoSkIaCa22LS/BgAWB0awg (envelope-from ) for ; Sat, 23 Jul 2022 02:52:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 7AE431E5EA; Sat, 23 Jul 2022 02:52:16 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=PCLNUBYw; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F2D841E222 for ; Sat, 23 Jul 2022 02:52:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 552F33857C4C for ; Sat, 23 Jul 2022 06:52:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 552F33857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1658559135; bh=KphkoHTp2wzHxxCxy6S1nx0PWcN853HjWhebR44IMAc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PCLNUBYwaRfTGnt0/JfYYowTKndg9CdmKs/JghCr4M6iQ++otNe1f8J/keX/SWn+Q 4uaJf2+P/XIawHEXGgys7dbkUien6KTS5Ckh+WG4B71FTdBp2o5yFuL3mriQrieFUm RRGxuBYc4PErnJhPXthCdLQFV7DrzmENdto0VAI8= Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 9C0D13858C50 for ; Sat, 23 Jul 2022 06:51:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C0D13858C50 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C3BB6208AA; Sat, 23 Jul 2022 06:51:55 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A512F13483; Sat, 23 Jul 2022 06:51:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FsBuJoua22JhfQAAMHmgww (envelope-from ); Sat, 23 Jul 2022 06:51:55 +0000 Message-ID: Date: Sat, 23 Jul 2022 08:51:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH][gdbsupport] Use task size in parallel_for_each To: Tom Tromey References: <20220718194219.GA16823@delia.home> <4fc23fcd-c15d-7622-8b51-cc48cd3cba16@palves.net> <75931310-5dcd-059d-9221-6c94dbcd231f@suse.de> <87leslj786.fsf@tromey.com> <87zgh0sv13.fsf@tromey.com> Content-Language: en-US In-Reply-To: <87zgh0sv13.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Pedro Alves , Tom de Vries via Gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 7/22/22 23:21, Tom Tromey wrote: > Tom> Then, rather than using parallel_for, the DWARF reader could send N jobs > Tom> to the thread pool, and each job would simply take the next available CU > Tom> by incrementing an atomic counter. When the counter reached the number > Tom> of CUs, a job would stop. > > Here's a patch. I didn't test it much, though according to "maint time 1", > it is ~10% faster on gdb itself. I pushed it as "t/work-stealing" on my > github as well, in case you want to try it out. > I've tried it out (initially didn't build for me with gcc 7.5.0, but it did after using gcc 12.1.1). So, the same libxul experiment as before, gcc-12, O2, base commit 5ae3df226b1. --- base commit: real: 4.64 real: 4.10 real: 4.11 real: 4.65 real: 4.04 real: 4.21 real: 4.03 real: 4.48 real: 4.04 real: 4.65 t/work-stealing: real: 3.65 real: 3.58 real: 3.58 real: 3.58 real: 3.58 real: 3.57 real: 3.58 real: 3.59 real: 3.59 real: 3.59 size heuristics: real: 3.44 real: 3.44 real: 3.52 real: 3.43 real: 3.54 real: 3.47 real: 3.60 real: 3.46 real: 3.46 real: 3.52 Just one data point of course. Thanks, - Tom