From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 From: Tom de Vries Subject: Re: [PATCH][gdbsupport] Use task size in parallel_for_each To: Tom Tromey Cc: Tom de Vries via Gdb-patches , Pedro Alves 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-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Sat, 23 Jul 2022 06:51:58 -0000 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