From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DDaPJPLbZmhDfSoAWB0awg (envelope-from ) for ; Thu, 03 Jul 2025 15:37:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751571442; bh=wOMuNM9rVqwg+RZykXTH9ZYAQ6W9N7CBjB/pc4gwj2c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IX5yljxuudOWoX1/PO3VYEY4SWBDmn4Ewb1RhmmkHTD1d/tqklLVOUkVPxDlvT+CE vGJWNAwM2r/xpQNHIi1bRGxTeyUF+tCK1ks7f3+uEkDIbhE8MzDMe2USEMPcYcb6/t aVa8zgCQkAfEzWI6OTgN9S3kt7Lb05ar7+3/moWg= Received: by simark.ca (Postfix, from userid 112) id 8707D1E11E; Thu, 3 Jul 2025 15:37:22 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=unavailable autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=dJe9UnwJ; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Pz1j0b4x; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 135A31E0C2 for ; Thu, 3 Jul 2025 15:37:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AACBB385210D for ; Thu, 3 Jul 2025 19:37:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AACBB385210D Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=dJe9UnwJ; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Pz1j0b4x Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4758D385E825 for ; Thu, 3 Jul 2025 19:36:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4758D385E825 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4758D385E825 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751571413; cv=none; b=snOVrLCsetJ6375GgkFBFnLUXtFz/x0+ytVViP4wu/DLprIIkgSkFXKR4GTbxVQHnkoq/Z8hYRKiJKQVHm9e8mkR+2cioeTeTpXpReoKjqiuVh/2v7M5WKdMdXxP5MWXPNS7bG38wu2L1Fq0uTMN9qzOVpHTYHho8FsHlREYk8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751571413; c=relaxed/simple; bh=wOMuNM9rVqwg+RZykXTH9ZYAQ6W9N7CBjB/pc4gwj2c=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=x+PWkBbgy5uZjRfcJytcIPZyWytq5nL/00Tv3oZDTdm/tBELejMLNJS/95f8Nf2dKjxF55mRyGpxghqyOqoZf+88VTfHLiHlKITlNl8h53sbCfCcX//DOk4lhUFtsaJePTI9NpYoXEmy/cEXzwv8iIAuVkeIBf8RNlyN4lfxEOU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4758D385E825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751571412; bh=wOMuNM9rVqwg+RZykXTH9ZYAQ6W9N7CBjB/pc4gwj2c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dJe9UnwJxRT5iwgGNQmgSsu7/56LC4hkJX8p+QHe+vLFGXlgZu0GIU4SE/w1FG1Wi qxIKW759pTbmylifUd1pNXLGWpwT6a24M6qA6hnICWlUB2otv3Y6+p1Zqxa4s5iBCk SSRCEAdH/Jnf1W58SMuypfIsv/bx5J3z/qP3X4WI= Received: by simark.ca (Postfix, from userid 112) id 9350E1E11F; Thu, 3 Jul 2025 15:36:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751571411; bh=wOMuNM9rVqwg+RZykXTH9ZYAQ6W9N7CBjB/pc4gwj2c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Pz1j0b4xw88IY/0Cbjrc24VQ6Iqhnzq0tBFsnmWDRYd9ks7VjtfAFbxPTiE43kEk6 oORel2mV0CS6lTr1BbEXkZb4URFHNNvobFUm6pY2QDsoVYXHKtZIOFfPzCDkZ0lMiB ljeN/VZEHszIWI6cfI1cNxXJJyaBryT4O48oa/ko= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3BC931E0C2; Thu, 3 Jul 2025 15:36:51 -0400 (EDT) Message-ID: <2eb268a2-eac1-4b94-977a-de29b487dcf4@simark.ca> Date: Thu, 3 Jul 2025 15:36:50 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/6] gdbsupport: use dynamic partitioning in gdb::parallel_for_each To: Tom Tromey Cc: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org References: <20250505201548.184917-1-simon.marchi@efficios.com> <20250505201548.184917-3-simon.marchi@efficios.com> <87tt4jjy13.fsf@tromey.com> <46f028fd-14f8-49a5-afc1-d6661d6f84ac@polymtl.ca> <2047e4f3-49d3-4dde-991a-8e22bd80c6ef@polymtl.ca> <3a7fcb84-773c-4c08-ac59-23bd6e5a508e@simark.ca> <87plehulie.fsf@tromey.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <87plehulie.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2025-07-03 15:23, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Sorry for the delay on this. My time is split these days and so I'm not > keeping up with gdb quite as frequently. > > Simon> I have thought about this problem some more, and I discussed this with > Simon> my team. I still think that the functor approach is the only one that > Simon> relatively cleanly meets the various requirements: > > Simon> - be able to run a per-worker initialize step > Simon> - be able to keep some per-worker data for the duration of the for-each > Simon> - be able to run a per-worker finalize step > > IMO let's just go with your original plan. It seems clear & > straightforward. I don't like the wordiness so much but I tend to think > the other alternatives are less clear. It is a bit more chatty, but I find it easier to understand, actually. All the code and data used by the worker thread is in that class, wells separated from the "main" path. I will send an updated v2 then. > This seems like another area that coroutines would clear up. I have > high hopes for those removing a lot of extraneous classes and turning > them into local variables. No idea when we can adopt C++20 though. I'd be curious to see how that would look like for our parallel for-each. Simon