{"thread":{"id":"61517","subject":"[PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","startedAt":"2024-05-20T11:11:14Z","lastAt":"2024-05-27T20:12:28Z","messageCount":23,"participants":["John Paul Adrian Glaubitz","Junio C Hamano","Eric Sunshine","Carlo Marcelo Arenas Belón"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"495077","messageId":"20240520111109.99882-1-glaubitz@physik.fu-berlin.de","threadId":"61517","inReplyTo":null,"subject":"[PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-20T11:11:09Z","receivedAt":"2024-05-20T11:11:14Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"On SPARC systems running Linux, individual processors are denoted with\n\"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\" so that\nthe current regexp in ncores() returns 0. Extend the regexp to match\nlines with \"CPUnn:\" as well to properly detect the number of available\ncores on these systems.\n\nSigned-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n---\n t/chainlint.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/chainlint.pl b/t/chainlint.pl\nindex 556ee91a15..63cac942ac 100755\n--- a/t/chainlint.pl\n+++ b/t/chainlint.pl\n@@ -718,7 +718,7 @@ sub ncores {\n \t# Windows\n \treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n \t# Linux / MSYS2 / Cygwin / WSL\n-\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n+\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:||^CPU[\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n \t# macOS & BSD\n \treturn qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n \treturn 1;\n-- \n2.39.2\n\n"},{"id":"495086","messageId":"xmqqseyclaq8.fsf@gitster.g","threadId":"61517","inReplyTo":"20240520111109.99882-1-glaubitz@physik.fu-berlin.de","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-20T16:16:47Z","receivedAt":"2024-05-20T16:16:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> writes:\n\n> On SPARC systems running Linux, individual processors are denoted with\n> \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\" so that\n> the current regexp in ncores() returns 0. Extend the regexp to match\n> lines with \"CPUnn:\" as well to properly detect the number of available\n> cores on these systems.\n>\n> Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> ---\n>  t/chainlint.pl | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/chainlint.pl b/t/chainlint.pl\n> index 556ee91a15..63cac942ac 100755\n> --- a/t/chainlint.pl\n> +++ b/t/chainlint.pl\n> @@ -718,7 +718,7 @@ sub ncores {\n>  \t# Windows\n>  \treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n>  \t# Linux / MSYS2 / Cygwin / WSL\n> -\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> +\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:||^CPU[\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n\nIs the doubled || intended?  Doesn't it introduce an empty pattern\nthat slurps every single line of /proc/cpuinfo?\n\nI was wondering if we want to first add the \"reasonable fallback\"\nEric mentioned ealier, and then build on top, whose result may look\nlike the attached.  You can enable the STDERR thing with your double\n\"||\" added back and see what \"cd t && perl chainlint.pl\" produces.\n\nThanks.\n\ndiff --git i/t/chainlint.pl w/t/chainlint.pl\nindex 556ee91a15..775f06281b 100755\n--- i/t/chainlint.pl\n+++ w/t/chainlint.pl\n@@ -718,7 +718,13 @@ sub ncores {\n \t# Windows\n \treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n \t# Linux / MSYS2 / Cygwin / WSL\n-\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n+\tdo {\n+\t\tlocal @ARGV='/proc/cpuinfo';\n+\t\tmy @num = grep(/^processor[\\s\\d]*:|^CPU[\\d]*:/, <>);\n+# print STDERR \"FOUND <@num>\\n\";\n+\t\treturn 1 if (!@num);\n+\t\treturn scalar(@num);\n+\t} if -r '/proc/cpuinfo';\n \t# macOS & BSD\n \treturn qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n \treturn 1;\n"},{"id":"495087","messageId":"503a99f3511559722a3eeef15d31027dfe617fa1.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"xmqqseyclaq8.fsf@gitster.g","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-20T16:48:44Z","receivedAt":"2024-05-20T16:48:50Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"Hi Junio,\n\nOn Mon, 2024-05-20 at 09:16 -0700, Junio C Hamano wrote:\n> John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> writes:\n> \n> > On SPARC systems running Linux, individual processors are denoted with\n> > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\" so that\n> > the current regexp in ncores() returns 0. Extend the regexp to match\n> > lines with \"CPUnn:\" as well to properly detect the number of available\n> > cores on these systems.\n> > \n> > Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> > ---\n> >  t/chainlint.pl | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/t/chainlint.pl b/t/chainlint.pl\n> > index 556ee91a15..63cac942ac 100755\n> > --- a/t/chainlint.pl\n> > +++ b/t/chainlint.pl\n> > @@ -718,7 +718,7 @@ sub ncores {\n> >  \t# Windows\n> >  \treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n> >  \t# Linux / MSYS2 / Cygwin / WSL\n> > -\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> > +\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:||^CPU[\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> \n> Is the doubled || intended?  Doesn't it introduce an empty pattern\n> that slurps every single line of /proc/cpuinfo?\n\nI'm not a Perl expert by any means, so I wasn't sure what the correct logical OR\noperator would be. If it turns out to be wrong, let's fix that.\n\n> I was wondering if we want to first add the \"reasonable fallback\"\n> Eric mentioned ealier, and then build on top, whose result may look\n> like the attached.  You can enable the STDERR thing with your double\n> \"||\" added back and see what \"cd t && perl chainlint.pl\" produces.\n> \n> Thanks.\n> \n> diff --git i/t/chainlint.pl w/t/chainlint.pl\n> index 556ee91a15..775f06281b 100755\n> --- i/t/chainlint.pl\n> +++ w/t/chainlint.pl\n> @@ -718,7 +718,13 @@ sub ncores {\n>  \t# Windows\n>  \treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n>  \t# Linux / MSYS2 / Cygwin / WSL\n> -\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> +\tdo {\n> +\t\tlocal @ARGV='/proc/cpuinfo';\n> +\t\tmy @num = grep(/^processor[\\s\\d]*:|^CPU[\\d]*:/, <>);\n> +# print STDERR \"FOUND <@num>\\n\";\n> +\t\treturn 1 if (!@num);\n> +\t\treturn scalar(@num);\n> +\t} if -r '/proc/cpuinfo';\n>  \t# macOS & BSD\n>  \treturn qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n>  \treturn 1;\n\nThis seems to work fine for me as well. If you post it as a patch, I'm more than\nhappy to give it a Tested-By.\n\nBtw, it would be great if this could be extended to support the output for the\nAlpha architecture as well since the testsuite fails the same way [1]. The output\nfor /proc/cpuinfo looks like this [2]:\n\n(alpha-chroot)root@p100:/# cat /proc/cpuinfo\ncpu                     : Alpha\ncpu model               : ev67\ncpu variation           : 0\ncpu revision            : 0\ncpu serial number       : JA00000000\nsystem type             : QEMU\nsystem variation        : QEMU_v8.0.92\nsystem revision         : 0\nsystem serial number    : AY00000000\ncycle frequency [Hz]    : 250000000\ntimer frequency [Hz]    : 250.00\npage size [bytes]       : 8192\nphys. address bits      : 44\nmax. addr. space #      : 255\nBogoMIPS                : 2500.00\nplatform string         : AlphaServer QEMU user-mode VM\ncpus detected           : 8\ncpus active             : 4\ncpu active mask         : 0000000000000095\nL1 Icache               : n/a\nL1 Dcache               : n/a\nL2 cache                : n/a\nL3 cache                : n/a\n\nThanks so much for helping with the fix!\n\nAdrian\n\n> [1] https://buildd.debian.org/status/fetch.php?pkg=git&arch=alpha&ver=1%3A2.45.1-1&stamp=1716194983&raw=0\n> [2] https://lore.kernel.org/all/20230901204251.137307-4-richard.henderson@linaro.org/\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495088","messageId":"CAPig+cQsc4AUJ7-0v=rS8VVK9JG1+_iSwa_gWUUigs=uwYq6Lw@mail.gmail.com","threadId":"61517","inReplyTo":"xmqqseyclaq8.fsf@gitster.g","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-20T16:50:12Z","receivedAt":"2024-05-20T16:50:25Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 20, 2024 at 12:16 PM Junio C Hamano <gitster@pobox.com> wrote:\n> John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> writes:\n> > On SPARC systems running Linux, individual processors are denoted with\n> > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\" so that\n> > the current regexp in ncores() returns 0. Extend the regexp to match\n> > lines with \"CPUnn:\" as well to properly detect the number of available\n> > cores on these systems.\n> >\n> > Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> > ---\n> > diff --git a/t/chainlint.pl b/t/chainlint.pl\n> > @@ -718,7 +718,7 @@ sub ncores {\n> >       # Windows\n> >       return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n> >       # Linux / MSYS2 / Cygwin / WSL\n> > -     do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> > +     do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:||^CPU[\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n>\n> Is the doubled || intended?  Doesn't it introduce an empty pattern\n> that slurps every single line of /proc/cpuinfo?\n\nI was also wondering about `||`; it looks like a typo.\n\nMore importantly, though, we can simplify the pattern to:\n\n    /^(processor|CPU)[\\s\\d]*:/\n\nwhich is much easier to comprehend and gives correct results from the\nSPARC /proc/cpuinfo output.\n\n> I was wondering if we want to first add the \"reasonable fallback\"\n> Eric mentioned ealier, and then build on top, whose result may look\n> like the attached.\n\nI'm fine with a well-focused patch which just fixes the reported\nproblem; the \"reasonable fallback\" change can be layered atop at any\ntime. But, of course, if Adrian wants to tackle it as part of this\nseries, I would not object.\n\n> diff --git i/t/chainlint.pl w/t/chainlint.pl\n> @@ -718,7 +718,13 @@ sub ncores {\n>         # Windows\n>         return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n>         # Linux / MSYS2 / Cygwin / WSL\n> -       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> +       do {\n> +               local @ARGV='/proc/cpuinfo';\n> +               my @num = grep(/^processor[\\s\\d]*:|^CPU[\\d]*:/, <>);\n> +# print STDERR \"FOUND <@num>\\n\";\n> +               return 1 if (!@num);\n> +               return scalar(@num);\n> +       } if -r '/proc/cpuinfo';\n>         # macOS & BSD\n>         return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n>         return 1;\n\nI had a more all-inclusive change in mind. These number-of-cpu checks\nare in order from least to most costly but they are not necessarily\nmutually exclusive. As such, my thinking was that the logic would fall\nthrough to the next check if the preceding check produced zero or\nnonsense.\n"},{"id":"495089","messageId":"CAPig+cQ0eLdFnRjp-aPAzhyNDC5dxfCqKf3i5bqcQ8NviE8LPQ@mail.gmail.com","threadId":"61517","inReplyTo":"503a99f3511559722a3eeef15d31027dfe617fa1.camel@physik.fu-berlin.de","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-20T16:52:11Z","receivedAt":"2024-05-20T16:52:23Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 20, 2024 at 12:48 PM John Paul Adrian Glaubitz\n<glaubitz@physik.fu-berlin.de> wrote:\n> Btw, it would be great if this could be extended to support the output for the\n> Alpha architecture as well since the testsuite fails the same way [1]. The output\n> for /proc/cpuinfo looks like this [2]:\n>\n> (alpha-chroot)root@p100:/# cat /proc/cpuinfo\n> cpus detected           : 8\n> cpus active             : 4\n\nWhat would be the correct answer for this case? 4 or 8?\n"},{"id":"495090","messageId":"CAPig+cSGjE69N0TpB4ub7vY5fXHpDJ6j4-xet8G1zcgRo4OHHA@mail.gmail.com","threadId":"61517","inReplyTo":"CAPig+cQsc4AUJ7-0v=rS8VVK9JG1+_iSwa_gWUUigs=uwYq6Lw@mail.gmail.com","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-20T17:07:01Z","receivedAt":"2024-05-20T17:07:13Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 20, 2024 at 12:50 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Mon, May 20, 2024 at 12:16 PM Junio C Hamano <gitster@pobox.com> wrote:\n> >         # Windows\n> >         return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n> >         # Linux / MSYS2 / Cygwin / WSL\n> > -       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n> > +       do {\n> > +               local @ARGV='/proc/cpuinfo';\n> > +               my @num = grep(/^processor[\\s\\d]*:|^CPU[\\d]*:/, <>);\n> > +# print STDERR \"FOUND <@num>\\n\";\n> > +               return 1 if (!@num);\n> > +               return scalar(@num);\n> > +       } if -r '/proc/cpuinfo';\n> >         # macOS & BSD\n> >         return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n> >         return 1;\n>\n> I had a more all-inclusive change in mind. These number-of-cpu checks\n> are in order from least to most costly but they are not necessarily\n> mutually exclusive. As such, my thinking was that the logic would fall\n> through to the next check if the preceding check produced zero or\n> nonsense.\n\nHmph. Looking at this more closely, I guess I did make these more\nmutually-exclusive than I had thought, so falling through to the next\ncheck probably doesn't buy us much. In any case, for robustness, I\nstill think that each check needs to have a sensible fallback. An\nalternative would be for the caller of ncores() to fallback to 1 if\nncores() returns 0 (or nonsense).\n"},{"id":"495093","messageId":"xmqqbk50jt1s.fsf@gitster.g","threadId":"61517","inReplyTo":"CAPig+cQsc4AUJ7-0v=rS8VVK9JG1+_iSwa_gWUUigs=uwYq6Lw@mail.gmail.com","subject":"Re: [PATCH] chainlint.pl: Extend regexp pattern for /proc/cpuinfo on Linux SPARC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-20T17:23:59Z","receivedAt":"2024-05-20T17:24:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>> I was wondering if we want to first add the \"reasonable fallback\"\n>> Eric mentioned ealier, and then build on top, whose result may look\n>> like the attached.\n>\n> I'm fine with a well-focused patch which just fixes the reported\n> problem; the \"reasonable fallback\" change can be layered atop at any\n> time.\n\nYeah, I never suggested to do these in a single patch.  Since I\nwould think that it is easier to do and review a patch that cleans\nup the code and adds a reasonable fallback before adding new support\nfor sparc or alpha (after all, such a clean-up is also for longer\nterm maintainability---by definition, it must be easier to add new\nsupport to the result of a clean-up than the original, or it is not\na clean-up), I suggested to first add such a change.  What you saw\nwas how the result of \"then build on top\" would have looked like.\n\n> I had a more all-inclusive change in mind. These number-of-cpu checks\n> are in order from least to most costly but they are not necessarily\n> mutually exclusive. As such, my thinking was that the logic would fall\n> through to the next check if the preceding check produced zero or\n> nonsense.\n\nOK.  All the more reason to clean-up first, then?  If we pile more\non top of the current structure, it would make the later clean-up\nmore cumbersome, wouldn't it?\n\nThanks.\n\n"},{"id":"495097","messageId":"20240520190131.94904-3-ericsunshine@charter.net","threadId":"61517","inReplyTo":"20240520190131.94904-1-ericsunshine@charter.net","subject":"[PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"ericsunshine@charter.net","sentAt":"2024-05-20T19:01:30Z","receivedAt":"2024-05-20T19:03:28Z","isPatch":true,"sender":{"key":"ericsunshine@charter.net","avatar":null},"body":"From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n\nOn SPARC systems running Linux, individual processors are denoted with\n\"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\". As a\nresult, the regexp in ncores() matches 0 times. Address this shortcoming\nby extending the regexp to also match lines with \"CPUnn:\".\n\nSigned-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n[es: simplified regexp; tweaked commit message]\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/chainlint.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/chainlint.pl b/t/chainlint.pl\nindex d9a2691889..d593cb95e7 100755\n--- a/t/chainlint.pl\n+++ b/t/chainlint.pl\n@@ -724,7 +724,7 @@ sub ncores {\n \tif (open my $fh, '<', '/proc/cpuinfo') {\n \t\tmy $cpuinfo = do { local $/; <$fh> };\n \t\tclose($fh);\n-\t\tmy @matches = ($cpuinfo =~ /^processor[\\s\\d]*:/mg);\n+\t\tmy @matches = ($cpuinfo =~ /^(processor|CPU)[\\s\\d]*:/mg);\n \t\treturn @matches ? scalar(@matches) : 1;\n \t}\n \t# macOS & BSD\n-- \n2.45.1\n\n"},{"id":"495098","messageId":"20240520190131.94904-4-ericsunshine@charter.net","threadId":"61517","inReplyTo":"20240520190131.94904-1-ericsunshine@charter.net","subject":"[PATCH 3/3] chainlint.pl: latch CPU count directly reported by /proc/cpuinfo","fromName":"Eric Sunshine","fromEmail":"ericsunshine@charter.net","sentAt":"2024-05-20T19:01:31Z","receivedAt":"2024-05-20T19:03:28Z","isPatch":true,"sender":{"key":"ericsunshine@charter.net","avatar":null},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nOn Linux, ncores() computes the number of CPUs by counting the\n\"processor\" or \"CPU\" lines emitted by /proc/cpuinfo. However, on some\nplatforms, /proc/cpuinfo does not enumerate the CPUs at all, but\ninstead merely mentions the total number of CPUs. In such cases, pluck\nthe CPU count directly from the /proc/cpuinfo line which reports the\nnumber of active CPUs. (In particular, check for \"cpus active: NN\" and\n\"ncpus active: NN\" since both variants have been seen in the\nwild[1,2].)\n\n[1]: https://lore.kernel.org/git/503a99f3511559722a3eeef15d31027dfe617fa1.camel@physik.fu-berlin.de/\n[2]: https://lore.kernel.org/git/7acbd5c6c68bd7ba020e2d1cc457a8954fd6edf4.camel@physik.fu-berlin.de/\n\nReported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/chainlint.pl | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/t/chainlint.pl b/t/chainlint.pl\nindex d593cb95e7..1bbd985b78 100755\n--- a/t/chainlint.pl\n+++ b/t/chainlint.pl\n@@ -724,6 +724,9 @@ sub ncores {\n \tif (open my $fh, '<', '/proc/cpuinfo') {\n \t\tmy $cpuinfo = do { local $/; <$fh> };\n \t\tclose($fh);\n+\t\tif ($cpuinfo =~ /^n?cpus active\\s*:\\s*(\\d+)/m) {\n+\t\t\treturn $1 if $1 > 0;\n+\t\t}\n \t\tmy @matches = ($cpuinfo =~ /^(processor|CPU)[\\s\\d]*:/mg);\n \t\treturn @matches ? scalar(@matches) : 1;\n \t}\n-- \n2.45.1\n\n"},{"id":"495099","messageId":"20240520190131.94904-2-ericsunshine@charter.net","threadId":"61517","inReplyTo":"20240520190131.94904-1-ericsunshine@charter.net","subject":"[PATCH 1/3] chainlint.pl: make CPU count computation more robust","fromName":"Eric Sunshine","fromEmail":"ericsunshine@charter.net","sentAt":"2024-05-20T19:01:29Z","receivedAt":"2024-05-20T19:03:28Z","isPatch":true,"sender":{"key":"ericsunshine@charter.net","avatar":null},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nThere have been reports[1,2] of chainlint.pl failing to produce output\nwhen output is expected. In fact, the underlying problem is more severe:\nin these cases, it isn't doing any work at all, thus not checking Git\ntests for semantic problems. In the reported cases, the problem was\ntracked down to ncores() returning 0 for the CPU count, which resulted\nin chainlint.pl not performing any work (since it thought it had no\ncores on which to process).\n\nIn the reported cases, the reason for the failure was that the regular\nexpression counting the number of processors reported by /proc/cpuinfo\nfailed to find any matches, hence it counted 0 processors. Although\nfixing each case as it is reported allows chaining.pl to work correctly\non that architecture, it does nothing to improve the overall robustness\nof the core count computation which may still return 0 on some yet\nuntested architecture.\n\nAddress this shortcoming by ensuring that ncores() returns a sensible\nfallback value in all cases.\n\n[1]: https://lore.kernel.org/git/pull.1385.git.git.1669148861635.gitgitgadget@gmail.com/\n[2]: https://lore.kernel.org/git/8baa12f8d044265f1ddeabd64209e7ac0d3700ae.camel@physik.fu-berlin.de/\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/chainlint.pl | 17 ++++++++++++++---\n 1 file changed, 14 insertions(+), 3 deletions(-)\n\ndiff --git a/t/chainlint.pl b/t/chainlint.pl\nindex 556ee91a15..d9a2691889 100755\n--- a/t/chainlint.pl\n+++ b/t/chainlint.pl\n@@ -716,11 +716,22 @@ sub fd_colors {\n \n sub ncores {\n \t# Windows\n-\treturn $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n+\tif (exists($ENV{NUMBER_OF_PROCESSORS})) {\n+\t\tmy $ncpu = $ENV{NUMBER_OF_PROCESSORS};\n+\t\treturn $ncpu > 0 ? $ncpu : 1;\n+\t}\n \t# Linux / MSYS2 / Cygwin / WSL\n-\tdo { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\\s\\d]*:/, <>)); } if -r '/proc/cpuinfo';\n+\tif (open my $fh, '<', '/proc/cpuinfo') {\n+\t\tmy $cpuinfo = do { local $/; <$fh> };\n+\t\tclose($fh);\n+\t\tmy @matches = ($cpuinfo =~ /^processor[\\s\\d]*:/mg);\n+\t\treturn @matches ? scalar(@matches) : 1;\n+\t}\n \t# macOS & BSD\n-\treturn qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n+\tif ($^O =~ /(?:^darwin$|bsd)/) {\n+\t\tmy $ncpu = qx/sysctl -n hw.ncpu/;\n+\t\treturn $ncpu > 0 ? $ncpu : 1;\n+\t}\n \treturn 1;\n }\n \n-- \n2.45.1\n\n"},{"id":"495100","messageId":"20240520190131.94904-1-ericsunshine@charter.net","threadId":"61517","inReplyTo":"20240520111109.99882-1-glaubitz@physik.fu-berlin.de","subject":"[PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"Eric Sunshine","fromEmail":"ericsunshine@charter.net","sentAt":"2024-05-20T19:01:28Z","receivedAt":"2024-05-20T19:03:28Z","isPatch":true,"sender":{"key":"ericsunshine@charter.net","avatar":null},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nThis series replaces a patch[1] sent by John Paul Adrian Glaubitz to fix\nchainlint.pl CPU count computation on Linux SPARC.\n\nUnlike its predecessor, this series also fixes an underlying problem in\nwhich ncores() could return 0 which would result in chainlint.pl not\nprocessing any of its input test scripts. Patch [3/3] also fixes CPU\ncount detection on Alpha[2].\n\nPatch [2/3] of this series is more or less Adrian's original patch[1] so\nit retains his authorship, though I simplified the regular-expression\nand tweaked the commit message.\n\n[1]: https://lore.kernel.org/git/20240520111109.99882-1-glaubitz@physik.fu-berlin.de/\n[2]: https://lore.kernel.org/git/503a99f3511559722a3eeef15d31027dfe617fa1.camel@physik.fu-berlin.de/\n\nEric Sunshine (2):\n  chainlint.pl: make CPU count computation more robust\n  chainlint.pl: latch CPU count directly reported by /proc/cpuinfo\n\nJohn Paul Adrian Glaubitz (1):\n  chainlint.pl: fix incorrect CPU count on Linux SPARC\n\n t/chainlint.pl | 20 +++++++++++++++++---\n 1 file changed, 17 insertions(+), 3 deletions(-)\n\n-- \n2.45.1\n\n"},{"id":"495102","messageId":"277726443f533446be4391cf2aa3d487974a7a18.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"20240520190131.94904-1-ericsunshine@charter.net","subject":"Re: [PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-20T19:17:41Z","receivedAt":"2024-05-20T19:17:45Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"On Mon, 2024-05-20 at 15:01 -0400, Eric Sunshine wrote:\n> From: Eric Sunshine <sunshine@sunshineco.com>\n> \n> This series replaces a patch[1] sent by John Paul Adrian Glaubitz to fix\n> chainlint.pl CPU count computation on Linux SPARC.\n> \n> Unlike its predecessor, this series also fixes an underlying problem in\n> which ncores() could return 0 which would result in chainlint.pl not\n> processing any of its input test scripts. Patch [3/3] also fixes CPU\n> count detection on Alpha[2].\n> \n> Patch [2/3] of this series is more or less Adrian's original patch[1] so\n> it retains his authorship, though I simplified the regular-expression\n> and tweaked the commit message.\n> \n> [1]: https://lore.kernel.org/git/20240520111109.99882-1-glaubitz@physik.fu-berlin.de/\n> [2]: https://lore.kernel.org/git/503a99f3511559722a3eeef15d31027dfe617fa1.camel@physik.fu-berlin.de/\n> \n> Eric Sunshine (2):\n>   chainlint.pl: make CPU count computation more robust\n>   chainlint.pl: latch CPU count directly reported by /proc/cpuinfo\n> \n> John Paul Adrian Glaubitz (1):\n>   chainlint.pl: fix incorrect CPU count on Linux SPARC\n> \n>  t/chainlint.pl | 20 +++++++++++++++++---\n>  1 file changed, 17 insertions(+), 3 deletions(-)\n> \n\nWorks as expected on my Linux SPARC machine running Debian unstable.\n\nTested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n\nAdrian\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495103","messageId":"CAPig+cQYJL+6J9PJX-vrNRXJ4TUCJCQRDQstUnPf4OOwOVCUnw@mail.gmail.com","threadId":"61517","inReplyTo":"277726443f533446be4391cf2aa3d487974a7a18.camel@physik.fu-berlin.de","subject":"Re: [PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-20T19:19:51Z","receivedAt":"2024-05-20T19:20:03Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 20, 2024 at 3:17 PM John Paul Adrian Glaubitz\n<glaubitz@physik.fu-berlin.de> wrote:\n> On Mon, 2024-05-20 at 15:01 -0400, Eric Sunshine wrote:\n> > From: Eric Sunshine <sunshine@sunshineco.com>\n> > This series replaces a patch[1] sent by John Paul Adrian Glaubitz to fix\n> > chainlint.pl CPU count computation on Linux SPARC.\n> >\n> > Unlike its predecessor, this series also fixes an underlying problem in\n> > which ncores() could return 0 which would result in chainlint.pl not\n> > processing any of its input test scripts. Patch [3/3] also fixes CPU\n> > count detection on Alpha[2].\n>\n> Works as expected on my Linux SPARC machine running Debian unstable.\n>\n> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n\nThanks for testing. Were you able to check whether it fixes CPU count\ndetection on Alpha, as well?\n"},{"id":"495105","messageId":"b3bef1539c4f81780b5f705e55b12898cb084254.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"CAPig+cQYJL+6J9PJX-vrNRXJ4TUCJCQRDQstUnPf4OOwOVCUnw@mail.gmail.com","subject":"Re: [PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-20T19:23:26Z","receivedAt":"2024-05-20T19:23:29Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"On Mon, 2024-05-20 at 15:19 -0400, Eric Sunshine wrote:\n> On Mon, May 20, 2024 at 3:17 PM John Paul Adrian Glaubitz\n> <glaubitz@physik.fu-berlin.de> wrote:\n> > On Mon, 2024-05-20 at 15:01 -0400, Eric Sunshine wrote:\n> > > From: Eric Sunshine <sunshine@sunshineco.com>\n> > > This series replaces a patch[1] sent by John Paul Adrian Glaubitz to fix\n> > > chainlint.pl CPU count computation on Linux SPARC.\n> > > \n> > > Unlike its predecessor, this series also fixes an underlying problem in\n> > > which ncores() could return 0 which would result in chainlint.pl not\n> > > processing any of its input test scripts. Patch [3/3] also fixes CPU\n> > > count detection on Alpha[2].\n> > \n> > Works as expected on my Linux SPARC machine running Debian unstable.\n> > \n> > Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> \n> Thanks for testing. Were you able to check whether it fixes CPU count\n> detection on Alpha, as well?\n\nI can test on Alpha, but that will take a little longer as I don't have\nmy setup ready. Will try to report back by tomorrow.\n\nLet me CC Michael Cree and Matt Turner who both own fast Alpha machines\nand might report back faster.\n\n@Michael, Matt: Could you test this patch series against the current git\n                development tree? It should fix the testsuite on Alpha.\n\nAdrian\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495165","messageId":"6861baa7663cc6cb78bb2e0be664c07530d179ab.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"b3bef1539c4f81780b5f705e55b12898cb084254.camel@physik.fu-berlin.de","subject":"Re: [PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-21T14:28:50Z","receivedAt":"2024-05-21T14:29:00Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"Hi Eric,\n\nOn Mon, 2024-05-20 at 21:23 +0200, John Paul Adrian Glaubitz wrote:\n> On Mon, 2024-05-20 at 15:19 -0400, Eric Sunshine wrote:\n> > Thanks for testing. Were you able to check whether it fixes CPU count\n> > detection on Alpha, as well?\n> \n> I can test on Alpha, but that will take a little longer as I don't have\n> my setup ready. Will try to report back by tomorrow.\n\nI have tested it now on single-core Alpha and it works as expected, so I\nthink it's safe to land the patches.\n\nI currently cannot test on SMP as I need to build a custom kernel for\nthat first which disables a problematic kernel option.\n\nAdrian\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495175","messageId":"CAPig+cTfHktPySO3rHikhOUwH0WW00PN99HLpNJWs9i2_TN7vg@mail.gmail.com","threadId":"61517","inReplyTo":"6861baa7663cc6cb78bb2e0be664c07530d179ab.camel@physik.fu-berlin.de","subject":"Re: [PATCH 0/3] improve chainlint.pl CPU count computation","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-21T16:18:16Z","receivedAt":"2024-05-21T16:18:50Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, May 21, 2024 at 10:28 AM John Paul Adrian Glaubitz\n<glaubitz@physik.fu-berlin.de> wrote:\n> On Mon, 2024-05-20 at 21:23 +0200, John Paul Adrian Glaubitz wrote:\n> > On Mon, 2024-05-20 at 15:19 -0400, Eric Sunshine wrote:\n> > > Thanks for testing. Were you able to check whether it fixes CPU count\n> > > detection on Alpha, as well?\n> >\n> > I can test on Alpha, but that will take a little longer as I don't have\n> > my setup ready. Will try to report back by tomorrow.\n>\n> I have tested it now on single-core Alpha and it works as expected, so I\n> think it's safe to land the patches.\n\nThank you for testing.\n"},{"id":"495283","messageId":"m4xqop5u2a4okzr2svg7j57ey5x5fyfqrqitwwzhh4uansuu7v@uy4tznnci6dy","threadId":"61517","inReplyTo":"20240520190131.94904-3-ericsunshine@charter.net","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2024-05-22T08:32:02Z","receivedAt":"2024-05-22T08:32:05Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"On Mon, May 20, 2024 at 03:01:30PM UTC, Eric Sunshine wrote:\n> From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> \n> On SPARC systems running Linux, individual processors are denoted with\n> \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n\nnot sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\nthe regexp used checks for numbers before the colon to account for the\nsyntax used on s390x which is the only one with numbers before the colon.\n\nCarlo\n"},{"id":"495284","messageId":"d655399efccfa6219cd982035c0408f9f084e344.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"m4xqop5u2a4okzr2svg7j57ey5x5fyfqrqitwwzhh4uansuu7v@uy4tznnci6dy","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-22T08:47:34Z","receivedAt":"2024-05-22T08:47:39Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"Hi Carlo,\n\nOn Wed, 2024-05-22 at 01:32 -0700, Carlo Marcelo Arenas Belón wrote:\n> On Mon, May 20, 2024 at 03:01:30PM UTC, Eric Sunshine wrote:\n> > From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> > \n> > On SPARC systems running Linux, individual processors are denoted with\n> > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n> \n> not sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\n> the regexp used checks for numbers before the colon to account for the\n> syntax used on s390x which is the only one with numbers before the colon.\n\nGood catch. I think this can just be fixed by whoever commits the patches\nor is that done automatically?\n\nAdrian\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495292","messageId":"CAPig+cTfqk+tbTAVyPj8YP1uHx1D1swL84h-4p6OKBV=dDRX_Q@mail.gmail.com","threadId":"61517","inReplyTo":"d655399efccfa6219cd982035c0408f9f084e344.camel@physik.fu-berlin.de","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-22T09:05:26Z","receivedAt":"2024-05-22T09:05:38Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, May 22, 2024 at 4:47 AM John Paul Adrian Glaubitz\n<glaubitz@physik.fu-berlin.de> wrote:\n> On Wed, 2024-05-22 at 01:32 -0700, Carlo Marcelo Arenas Belón wrote:\n> > On Mon, May 20, 2024 at 03:01:30PM UTC, Eric Sunshine wrote:\n> > > From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>\n> > >\n> > > On SPARC systems running Linux, individual processors are denoted with\n> > > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n> >\n> > not sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\n> > the regexp used checks for numbers before the colon to account for the\n> > syntax used on s390x which is the only one with numbers before the colon.\n>\n> Good catch. I think this can just be fixed by whoever commits the patches\n> or is that done automatically?\n\nInclusion of the word \"usual\" is such a minor flaw in the commit\nmessage that I doubt it warrants a reroll and the associated cost on\nreviewers and on the maintainer (Junio), especially since it does not\nnegatively impact the intent conveyed by the commit messages nor the\ncorrectness of the actual patch.\n\nAs such, I'm not worried about it. Whether Junio reads this and wants\nto correct it in his tree is up to him, of course.\n"},{"id":"495315","messageId":"xmqqh6ep4qoy.fsf@gitster.g","threadId":"61517","inReplyTo":"CAPig+cTfqk+tbTAVyPj8YP1uHx1D1swL84h-4p6OKBV=dDRX_Q@mail.gmail.com","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-22T19:00:45Z","receivedAt":"2024-05-22T19:00:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>> > > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n>> >\n>> > not sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\n> ...\n> Inclusion of the word \"usual\" is such a minor flaw in the commit\n> message that I doubt it warrants a reroll and the associated cost on\n> reviewers and on the maintainer (Junio), especially since it does not\n> negatively impact the intent conveyed by the commit messages nor the\n> correctness of the actual patch.\n>\n> As such, I'm not worried about it. Whether Junio reads this and wants\n> to correct it in his tree is up to him, of course.\n\nI think \"usual\" is not what was pointed out. The order between the\ncolon and NN is.\n"},{"id":"495318","messageId":"CAPig+cTxMTAf85Gyi5eEYAM4pOTq2UTD1=oCVBy1q8aSF3cn6Q@mail.gmail.com","threadId":"61517","inReplyTo":"xmqqh6ep4qoy.fsf@gitster.g","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-22T19:11:23Z","receivedAt":"2024-05-22T19:11:35Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, May 22, 2024 at 3:00 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> >> > > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n> >> >\n> >> > not sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\n> > ...\n> > Inclusion of the word \"usual\" is such a minor flaw in the commit\n> > message that I doubt it warrants a reroll and the associated cost on\n> > reviewers and on the maintainer (Junio), especially since it does not\n> > negatively impact the intent conveyed by the commit messages nor the\n> > correctness of the actual patch.\n> >\n> > As such, I'm not worried about it. Whether Junio reads this and wants\n> > to correct it in his tree is up to him, of course.\n>\n> I think \"usual\" is not what was pointed out. The order between the\n> colon and NN is.\n\nYes, I understood that, but it is the word \"usual\" which makes the\ntext \"processor NN:\" questionable since \"processor NN:\" is not\ntypical. Without the word \"usual\", stating \"processor NN:\" is not\nespecially problematic since the existing regex (which is being\nchanged by this patch) _does_ match \"processor NN:\" (among others such\nas \"processor:\").\n\nIf we want to be more accurate, better wording might be:\n\n    On SPARC systems running Linux, individual processors are denoted\n    with \"CPUnn:\" in /proc/cpuinfo, however, the regexp in ncores()\n    matches only \"processor:\" or \"processor NN:\". As a result, no\n    processors are found on SPARC. Address this shortcoming by\n    extending the regexp to also match lines with \"CPUnn:\".\n\nbut I doubt it is worth a reroll.\n"},{"id":"495707","messageId":"518a5c2f34180ee2e6b674d8dc5a66b8a2d345f7.camel@physik.fu-berlin.de","threadId":"61517","inReplyTo":"CAPig+cTxMTAf85Gyi5eEYAM4pOTq2UTD1=oCVBy1q8aSF3cn6Q@mail.gmail.com","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"John Paul Adrian Glaubitz","fromEmail":"glaubitz@physik.fu-berlin.de","sentAt":"2024-05-27T19:48:59Z","receivedAt":"2024-05-27T19:49:52Z","isPatch":true,"sender":{"key":"glaubitz@physik.fu-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1647645?v=4"},"body":"Hi,\n\nOn Wed, 2024-05-22 at 15:11 -0400, Eric Sunshine wrote:\n> On Wed, May 22, 2024 at 3:00 PM Junio C Hamano <gitster@pobox.com> wrote:\n> > Eric Sunshine <sunshine@sunshineco.com> writes:\n> > > > > > \"CPUnn:\" in /proc/cpuinfo instead of the usual \"processor NN:\".\n> > > > > \n> > > > > not sure if worth a reroll, but the \"usual\" syntax is \"processor  : NN\"\n> > > ...\n> > > Inclusion of the word \"usual\" is such a minor flaw in the commit\n> > > message that I doubt it warrants a reroll and the associated cost on\n> > > reviewers and on the maintainer (Junio), especially since it does not\n> > > negatively impact the intent conveyed by the commit messages nor the\n> > > correctness of the actual patch.\n> > > \n> > > As such, I'm not worried about it. Whether Junio reads this and wants\n> > > to correct it in his tree is up to him, of course.\n> > \n> > I think \"usual\" is not what was pointed out. The order between the\n> > colon and NN is.\n> \n> Yes, I understood that, but it is the word \"usual\" which makes the\n> text \"processor NN:\" questionable since \"processor NN:\" is not\n> typical. Without the word \"usual\", stating \"processor NN:\" is not\n> especially problematic since the existing regex (which is being\n> changed by this patch) _does_ match \"processor NN:\" (among others such\n> as \"processor:\").\n> \n> If we want to be more accurate, better wording might be:\n> \n>     On SPARC systems running Linux, individual processors are denoted\n>     with \"CPUnn:\" in /proc/cpuinfo, however, the regexp in ncores()\n>     matches only \"processor:\" or \"processor NN:\". As a result, no\n>     processors are found on SPARC. Address this shortcoming by\n>     extending the regexp to also match lines with \"CPUnn:\".\n> \n> but I doubt it is worth a reroll.\n\nSo, could we get this series merged now or is there anything missing?\n\nThanks,\nAdrian\n\n-- \n .''`.  John Paul Adrian Glaubitz\n: :' :  Debian Developer\n`. `'   Physicist\n  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913\n"},{"id":"495709","messageId":"CAPig+cRyLWzcs0Z1Zhi5_w8+Y53nfu44KgnMjETgo0ZK16W25w@mail.gmail.com","threadId":"61517","inReplyTo":"518a5c2f34180ee2e6b674d8dc5a66b8a2d345f7.camel@physik.fu-berlin.de","subject":"Re: [PATCH 2/3] chainlint.pl: fix incorrect CPU count on Linux SPARC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-27T20:12:16Z","receivedAt":"2024-05-27T20:12:28Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 27, 2024 at 3:49 PM John Paul Adrian Glaubitz\n<glaubitz@physik.fu-berlin.de> wrote:\n> So, could we get this series merged now or is there anything missing?\n\nThis series has already migrated from the \"seen\" branch to the \"next\"\nbranch in Junio's tree, and according to his latest \"What's Cooking\"\nreport[*], he will be merging it to his \"master\" branch soon, after\nwhich it should be incorporated into an actual release.\n\n[*]: topic \"es/chainlint-ncores-fix \" in\nhttps://lore.kernel.org/git/xmqq8qzyifnx.fsf@gitster.g/\n"}]}