From: Andreas Schwab <schwab@linux-m68k.org>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Andreas Hasenack <andreas@canonical.com>, git@vger.kernel.org
Subject: Re: chainlink.pl /proc/cpuinfo regexp fails on s390x
Date: Wed, 23 Nov 2022 10:27:05 +0100 [thread overview]
Message-ID: <mvm1qpu9g2e.fsf@linux-m68k.org> (raw)
In-Reply-To: <CAPig+cRchF_6t-B-cZHLHAH_E6qNmapTezSfCj9AZ8cfWNzivw@mail.gmail.com> (Eric Sunshine's message of "Tue, 22 Nov 2022 18:50:26 -0500")
On Nov 22 2022, Eric Sunshine wrote:
> On Tue, Nov 22, 2022 at 6:37 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>> On Nov 22 2022, Andreas Hasenack wrote:
>> > /^processor[\s\d]*:/
>> > or something else.
>>
>> Something else.
>>
>> $ getconf _NPROCESSORS_ONLN
>
> Yes, that works too and was (I'm pretty sure) considered during
> development. The reason /proc/cpu was chosen over `getconf` was that
> opening & reading /proc/cpu should be faster since it doesn't involve
> spawning a process. If we did use `getconf`, we'd have to be careful
> to degrade gracefully if `getconf` isn't available or if the
> configuration parameter (i.e. "_NPROCESSORS_ONLN") isn't known on the
> platform.
getconf is surely more portable than poking in /proc, especially
/proc/cpuinfo is the antipode of portability.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2022-11-23 9:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 17:37 chainlink.pl /proc/cpuinfo regexp fails on s390x Andreas Hasenack
2022-11-22 17:57 ` Eric Sunshine
2022-11-22 18:04 ` Andreas Hasenack
2022-11-22 18:13 ` Eric Sunshine
2022-11-22 18:42 ` Andreas Hasenack
2022-11-22 19:39 ` Eric Sunshine
2022-11-22 23:30 ` Andreas Schwab
2022-11-22 23:50 ` Eric Sunshine
2022-11-23 9:27 ` Andreas Schwab [this message]
2022-11-23 19:10 ` Eric Sunshine
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvm1qpu9g2e.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=andreas@canonical.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).