From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id EDF983858D3C for ; Tue, 21 Nov 2023 14:24:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EDF983858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EDF983858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700576678; cv=none; b=FI0X56vUkDUhFysP/4JmBeeqRbCpoixK7XUFAs8GpmHGD08t3J3GJMHCzaZBPLr6eoWW8Nyg/6RBWRoRIW/CqgPLU38Ty/YqtSLmZlwL1xvDc9mrhTH1MHnAyQfRERywueorsWFDW3+goeUkx3G2vtVaa+3yMTEIFEzuObnSfcY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700576678; c=relaxed/simple; bh=U7AWTR0bS4P5XLtRaMjjVRVNmn0hFm5FCkfQ0NQHrZc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UuFW6HBGRG8JveRb/p+t/SJQBGCNrtMJchqBuB6yAQe2SJSl+hGKUzi3oba9rImbjR2s9WdK1bDcWI5OPKYEsVkw57luc4qlDFQye8Am+a7suz1JiyQ4ew2QeIPFM5AXE+A269meyWsHqR/Z8zJq7dZppJDEP0098pYDklzL/As= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5001a.ext.cloudfilter.net ([10.0.29.139]) by cmsmtp with ESMTPS id 5BpzrXjF1L9Ag5Rg1rkj7q; Tue, 21 Nov 2023 14:24:33 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 5Rg0rKU0JkTVW5Rg1rDEdn; Tue, 21 Nov 2023 14:24:33 +0000 X-Authority-Analysis: v=2.4 cv=a58jSGeF c=1 sm=1 tr=0 ts=655cbda1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=6I5d2MoRAAAA:8 a=oUZXJdD_efUN5rxXKmwA:9 a=IjZwj45LgO3ly-622nXo:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PdWu+cRwBLVkgu2G3eGrbDUU8bRZvtGaVLYLjYIOXKs=; b=bLeAh4hMxTGdHCzpI7JdPKf1h9 CX8voTpUm5ymI2uz7/vyqPm8nHSB3598o0T0XRs01mIS/XC9csab28HtkbtDOjn9WKlYzZLGFwn1q S0ivx5HTedkLSAqtY9lrmn/+X; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:40690 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r5Rg0-003OIu-0q; Tue, 21 Nov 2023 07:24:32 -0700 From: Tom Tromey To: John Baldwin Cc: Tom de Vries , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 11/18] Do more DWARF reading in the background References: <20231112-t-bg-dwarf-reading-v2-0-70fb170012ba@tromey.com> <20231112-t-bg-dwarf-reading-v2-11-70fb170012ba@tromey.com> <3c87a020-8921-4adf-8c9a-d0bd5af62b86@suse.de> <246a3715-4aeb-42f4-a977-c5ebd53e0240@FreeBSD.org> <16a9ae74-af0d-41f7-86b9-8b9b55c45b9f@suse.de> X-Attribution: Tom Date: Tue, 21 Nov 2023 07:24:46 -0700 In-Reply-To: (John Baldwin's message of "Tue, 14 Nov 2023 09:31:39 -0800") Message-ID: <875y1vyyj5.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1r5Rg0-003OIu-0q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (prentzel) [97.122.77.73]:40690 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFh/1B+pleTKOAeg4ozAgUXm2X5vA0EA7CpX6HGZf2EbMF+jZrvgCYqcwrxB2BjmsXEgalN+0spaRGH/8bo0YD/LDM0bc18jZz3VBwwwsfL/ZFlmGWRE rMDRX/PaWDiDOqUlIlx2H6IW1lN0t7YitHFGhiEjtPBEbvlpiKEWF9sTpnQuNxf7y6eSmq0bb9bMS0slsGAxGC/1uP9YqA3I0+c= X-Spam-Status: No, score=-3017.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,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: >>>>> "John" == John Baldwin writes: John> Is it possible that you want size_per_thread to always round up? That would be better, except... John> Looking at the patch, I do think it's the case I described, so perhaps you John> want to always round up via: John> const size_t size_per_thread John> = (total_size + n_worker_threads - 1) / n_worker_threads; ... here 'total_size' is not a count, but instead the sum of the size of all the CUs. (This is done to try to balance the number of DIEs handled by each task.) So, adding n_worker_threads to this is like a units mismatch. Anyway I am going to use Tom's original proposal here: const size_t size_per_thread = std::max (total_size / n_worker_threads, (size_t) 1); Tom