From: David Laight <David.Laight@ACULAB.COM>
To: 'Victor Dumas' <dumasv.dev@gmail.com>,
"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH v4] support/scripts/fix-rpath: parallelize patching files
Date: Tue, 15 Nov 2022 08:47:58 +0000 [thread overview]
Message-ID: <9d9a3bbf2cfd4f60b82a47087ef8ecba@AcuMS.aculab.com> (raw)
In-Reply-To: <20221020115512.483686-1-dumasv.dev@gmail.com>
From: Victor Dumas
> Sent: 20 October 2022 12:55
>
> Using "xargs" instead of "while read" loop allows for the patching of files to be parallelized
> This significantly reduces the amount of time it takes to fix all the paths.
> On a larger RFS(~300MB) this script was taking 5 minutes, it now only takes about 30s on a 12 core
> machine
...
> + # Limit the number of cores used
> + procs=$(echo -e "$(($(nproc)-2)) \n 1" | sort -n | tail -n1)
> + find "${rootdir}" ${find_args[@]} | xargs -0 -r -P ${procs} -I {} bash -c "patch_file
> '${PATCHELF}' '${rootdir}' '${sanitize_extra_args}' $@" _ {}
Are you sure that all versions of xargs the script needs to
run on support -P ?
Having xargs run 'bash -c "command" ...' and the quoting also looks odd.
I presume there is some reason xargs can't just run patrch_file.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-11-15 8:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 12:24 [Buildroot] [PATCH] support/scripts/fix-rpath: parallelize patch files Victor Dumas
2022-10-06 13:18 ` Quentin Schulz via buildroot
2022-10-06 15:52 ` [Buildroot] [PATCH] support/scripts/fix-rpath: parallelize patching files Victor Dumas
2022-10-07 8:10 ` Quentin Schulz via buildroot
2022-10-07 15:50 ` [Buildroot] [PATCH v2] " Victor Dumas
2022-10-07 15:54 ` Victor Dumas
2022-10-19 12:40 ` [Buildroot] [PATCH v3] " Victor Dumas
2022-10-19 13:42 ` Angelo Compagnucci
2022-10-20 11:52 ` [Buildroot] [PATCH v4] " Victor Dumas
2022-10-20 11:55 ` Victor Dumas
2022-11-14 16:33 ` Quentin Schulz via buildroot
2022-11-15 8:47 ` David Laight [this message]
2022-11-15 9:24 ` Quentin Schulz via buildroot
2022-11-17 13:21 ` Gleb Mazovetskiy
2022-10-20 11:46 ` Victor Dumas
2022-10-20 11:50 ` Victor Dumas
2023-08-06 21:33 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d9a3bbf2cfd4f60b82a47087ef8ecba@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=buildroot@buildroot.org \
--cc=dumasv.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox