From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mr3.vodafonemail.de (mr3.vodafonemail.de [145.253.228.163]) by sourceware.org (Postfix) with ESMTPS id 118C33858CDA for ; Thu, 30 Mar 2023 19:49:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 118C33858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nexgo.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexgo.de; s=vfde-smtpout-mb-15sep; t=1680205782; bh=x9QHZT+mWHq+JJVtpr1SN7OIlpB3L5zrLRnCoSrv6T8=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=jKR+pNAh+HiEyNml8LSflEjtzGuzxHX6mO+vMulQKKhbYq4mL4Vtcm1ezrcIA3Sn2 3g+wMKGsc9HbzK+J/QVDEp0vYJhR+eOral+pnB//NWH31rNPtci0kD1MZGj/o4z9VX 0vQ0I1KtkU/3joFV392XASAgC33o6qbluzuClXqo= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4PnYsf4NVgz29j1 for ; Thu, 30 Mar 2023 19:49:42 +0000 (UTC) Received: from Gertrud (p57b9d9db.dip0.t-ipconnect.de [87.185.217.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4PnYsZ2h6gz9vxB for ; Thu, 30 Mar 2023 19:49:35 +0000 (UTC) From: Achim Gratz To: cygwin-apps@cygwin.com Subject: Re: [PATCH cygport] lib/src_postinst.cygpart: parallelize __prepstrip References: <822a414c-be34-319e-c8d9-810cf7383e7e@dronecode.org.uk> Date: Thu, 30 Mar 2023 21:49:27 +0200 In-Reply-To: <822a414c-be34-319e-c8d9-810cf7383e7e@dronecode.org.uk> (Jon Turney via Cygwin-apps's message of "Mon, 27 Mar 2023 19:43:50 +0100") Message-ID: <878rfec94o.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 2290 X-purgate-ID: 155817::1680205778-5D55A404-2ACD4233/0/0 X-Spam-Status: No, score=-3029.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 List-Id: Jon Turney via Cygwin-apps writes: > On 26/03/2023 19:12, Jon Turney via Cygwin-apps wrote: >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 usr/lib/gcc/*/lib*|usr/lib/= gcc/*/*.o) >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 usr/lib/gcc/*/*.o) >> Why this change? It looks like a mistake that I didn't catch. >>=20 >>> +=C2=A0=C2=A0=C2=A0 local nproc=3D$(nproc) >> This limit should probably be taken from the --jobs command line >> parameter, if specified Yes, although one could argue that it should actually oversubscribe since the CPU load per process is expected to be significantly less than 100% per process. > Looking at this a bit more, a couple of perhaps more serious problems: > > * The parallel invocations of __prepstrip_one are all appending to > ${T}/.dbgsrc.out > > I don't see what makes that safe against interleaving of the output. Line-buffering and the line being shorter than the buffer should. > It's probably possible to have each instance write to a separate file > and collect them together in __prepdebugsrc Nah, if you insist on making it _really_ safe regardless of line lenght and buffer size vagaries I'll do file locking on the output file. > * This patch causes several failures in the testsuite, e.g. with > autotools/c testcase. Which? > On a brief attempt at debugging, it this looks like it's due to not > waiting for all the __prepstrip_one to complete before moving on, but > I think the final wait should prevent that, so idk. I've seen an indication that the final wait doesn't work, but that is fixable by a sleep apparently. Did You see that the process number limiting doesn't work? > I'm not clear that invoking 'jobs', is actually doing anything, if > job-control is turned off in a non-interactive shell? No, "jobs" shouldn't do anything, but wait should still work I think (the manpage talks about jobs, but it really means "children"). But then again, a bit of googling tells me that the bashism "wait -n" actually needs job control to be enabled, natch. Regards, Achim. --=20 +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada