All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pthread_create.3: re-do the architecture/default stack size mapping
@ 2024-02-08 20:43 наб
  2024-02-11 18:56 ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: наб @ 2024-02-08 20:43 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]

Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
old PowerPC only, and most egregiously itanium,
which linux doesn't target.

Per glibc 2.38:
  $ git grep ARCH_STACK_DEFAULT_SIZE
  aarch64     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arc         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arm         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  csky        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  loongarch   #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  m68k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  microblaze  #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  mips        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  nios2       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  or1k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  riscv       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  s390        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sh          #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sparc32     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  x86         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)

  alpha       #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  powerpc     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  sparc64     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)

  hppa        #define ARCH_STACK_DEFAULT_SIZE  (8 * 1024 * 1024)

  ia64        #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)

I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
respectively, and AFAICT they haven't seen a processor released
in over a decade ‒ they aren't relevant to any modern reader.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 man3/pthread_create.3 | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index 66c67a6ff..fd6253bf4 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -200,23 +200,8 @@ .SH NOTES
 If the
 .B RLIMIT_STACK
 resource limit is set to "unlimited",
-a per-architecture value is used for the stack size.
-Here is the value for a few architectures:
-.RS
-.TS
-allbox;
-lb lb
-l r.
-Architecture	Default stack size
-i386	2 MB
-IA-64	32 MB
-PowerPC	4 MB
-S/390	2 MB
-Sparc-32	2 MB
-Sparc-64	4 MB
-x86_64	2 MB
-.TE
-.RE
+a per-architecture value is used for the stack size:
+2 MB on most architectures; 4 MB on POWER and Sparc-64.
 .SH BUGS
 In the obsolete LinuxThreads implementation,
 each of the threads in a process has a different process ID.
-- 
2.39.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] pthread_create.3: re-do the architecture/default stack size mapping
  2024-02-08 20:43 [PATCH] pthread_create.3: re-do the architecture/default stack size mapping наб
@ 2024-02-11 18:56 ` Alejandro Colomar
  2024-02-11 20:00   ` наб
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Colomar @ 2024-02-11 18:56 UTC (permalink / raw)
  To: наб; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 3122 bytes --]

Hi наб,

On Thu, Feb 08, 2024 at 09:43:21PM +0100, наб wrote:
> Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
> old PowerPC only, and most egregiously itanium,
> which linux doesn't target.
> 
> Per glibc 2.38:
>   $ git grep ARCH_STACK_DEFAULT_SIZE
>   aarch64     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   arc         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   arm         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   csky        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   loongarch   #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   m68k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   microblaze  #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   mips        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   nios2       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   or1k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   riscv       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   s390        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   sh          #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   sparc32     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   x86         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
> 
>   alpha       #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
>   powerpc     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
>   sparc64     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
> 
>   hppa        #define ARCH_STACK_DEFAULT_SIZE  (8 * 1024 * 1024)
> 
>   ia64        #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)
> 
> I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
> respectively, and AFAICT they haven't seen a processor released
> in over a decade ‒ they aren't relevant to any modern reader.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
> ---
>  man3/pthread_create.3 | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
> index 66c67a6ff..fd6253bf4 100644
> --- a/man3/pthread_create.3
> +++ b/man3/pthread_create.3
> @@ -200,23 +200,8 @@ .SH NOTES
>  If the
>  .B RLIMIT_STACK
>  resource limit is set to "unlimited",
> -a per-architecture value is used for the stack size.
> -Here is the value for a few architectures:
> -.RS
> -.TS
> -allbox;
> -lb lb
> -l r.
> -Architecture	Default stack size
> -i386	2 MB
> -IA-64	32 MB
> -PowerPC	4 MB
> -S/390	2 MB
> -Sparc-32	2 MB
> -Sparc-64	4 MB
> -x86_64	2 MB
> -.TE
> -.RE
> +a per-architecture value is used for the stack size:
> +2 MB on most architectures; 4 MB on POWER and Sparc-64.

Why capitalize POWER and omit PC?  Other than that, LGTM.

Thanks for the patch.

Have a lovely day!
Alex

>  .SH BUGS
>  In the obsolete LinuxThreads implementation,
>  each of the threads in a process has a different process ID.
> -- 
> 2.39.2



-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pthread_create.3: re-do the architecture/default stack size mapping
  2024-02-11 18:56 ` Alejandro Colomar
@ 2024-02-11 20:00   ` наб
  2024-02-11 20:37     ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: наб @ 2024-02-11 20:00 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

Hi!

On Sun, Feb 11, 2024 at 07:56:39PM +0100, Alejandro Colomar wrote:
> On Thu, Feb 08, 2024 at 09:43:21PM +0100, наб wrote:
> > +a per-architecture value is used for the stack size:
> > +2 MB on most architectures; 4 MB on POWER and Sparc-64.
> Why capitalize POWER and omit PC?  Other than that, LGTM.
This is what the official nomenclature seems to be:
  https://wiki.debian.org/ppc64el says
  > News
  > 
  > The IBM POWER platform, code name ppc64el, is an official architecture since
  > DebianJessie.
  > 
  > Required Hardware
  > 
  > Debian/ppc64el requires, at minimum, a POWER8 processor machine. Although
  > Debian was initially bootstrapped on a POWER7 set of servers, this class of
  > server is not supported anymore, and you are not able to run Debian/ppc64el
  > on a POWER 7 processor without hitting an illegal instruction fault.
  > 
  > There are, at this moment, a plenty of POWER8 machines being sold by
  > different companies. 

All the branding I've ever seen in the modern world calls it POWER,
and AIUI the PowerPC branding was abandoned like 15 years ago.

The debian wiki page even says
  > The ppc64el port is not aimed for old Powerpc Macintosh machines,
  > and, at the moment, there is no way to install it on this class of
  > machines.
but wikipedia tells me the last product from this line came out in 2006,
which is pushing two decades by now. Even then, apparently
"PowerPC is largely based on the earlier IBM POWER architecture"
so it's the same thing.

Maybe when Apple had a choke-hold on the millennial mind a calling it
"PowerPC" could've made sense, but through a modern lens PowerPC,
to the extent it exists at all, is just a derivative of POWER I think

Best,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] pthread_create.3: re-do the architecture/default stack size mapping
  2024-02-11 20:00   ` наб
@ 2024-02-11 20:37     ` Alejandro Colomar
  2024-02-11 22:27       ` [PATCH v2] " наб
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Colomar @ 2024-02-11 20:37 UTC (permalink / raw)
  To: наб; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

Hi!,

On Sun, Feb 11, 2024 at 09:00:04PM +0100, наб wrote:
> Hi!
> 
> On Sun, Feb 11, 2024 at 07:56:39PM +0100, Alejandro Colomar wrote:
> > On Thu, Feb 08, 2024 at 09:43:21PM +0100, наб wrote:
> > > +a per-architecture value is used for the stack size:
> > > +2 MB on most architectures; 4 MB on POWER and Sparc-64.
> > Why capitalize POWER and omit PC?  Other than that, LGTM.
> This is what the official nomenclature seems to be:
>   https://wiki.debian.org/ppc64el says
>   > News
>   > 
>   > The IBM POWER platform, code name ppc64el, is an official architecture since
>   > DebianJessie.
>   > 
>   > Required Hardware
>   > 
>   > Debian/ppc64el requires, at minimum, a POWER8 processor machine. Although
>   > Debian was initially bootstrapped on a POWER7 set of servers, this class of
>   > server is not supported anymore, and you are not able to run Debian/ppc64el
>   > on a POWER 7 processor without hitting an illegal instruction fault.
>   > 
>   > There are, at this moment, a plenty of POWER8 machines being sold by
>   > different companies. 
> 
> All the branding I've ever seen in the modern world calls it POWER,
> and AIUI the PowerPC branding was abandoned like 15 years ago.
> 
> The debian wiki page even says
>   > The ppc64el port is not aimed for old Powerpc Macintosh machines,
>   > and, at the moment, there is no way to install it on this class of
>   > machines.
> but wikipedia tells me the last product from this line came out in 2006,
> which is pushing two decades by now. Even then, apparently
> "PowerPC is largely based on the earlier IBM POWER architecture"
> so it's the same thing.
> 
> Maybe when Apple had a choke-hold on the millennial mind a calling it
> "PowerPC" could've made sense, but through a modern lens PowerPC,
> to the extent it exists at all, is just a derivative of POWER I think
> 
> Best,

Hmmm, thanks!  Could you include this (or an excerpt if you prefer) in
the commit message, since we're changing the nomenclature?

Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] pthread_create.3: re-do the architecture/default stack size mapping
  2024-02-11 20:37     ` Alejandro Colomar
@ 2024-02-11 22:27       ` наб
  2024-02-11 23:50         ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: наб @ 2024-02-11 22:27 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 2905 bytes --]

Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
old PowerPC only, and most egregiously itanium,
which linux doesn't target.

Per glibc 2.38:
  $ git grep ARCH_STACK_DEFAULT_SIZE
  aarch64     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arc         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arm         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  csky        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  loongarch   #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  m68k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  microblaze  #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  mips        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  nios2       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  or1k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  riscv       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  s390        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sh          #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sparc32     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  x86         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)

  alpha       #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  powerpc     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  sparc64     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)

  hppa        #define ARCH_STACK_DEFAULT_SIZE  (8 * 1024 * 1024)

  ia64        #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)

I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
respectively, and AFAICT they haven't seen a processor released
in over a decade, they aren't relevant to any modern reader.

Similarly, use "POWER" instead of "PowerPC" ‒ the consensus branding
is "POWER"+version (POWER8/POWER9); PowerPC is itself a POWER variant
and doesn't really deserve its own special mention, especially in 2024.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 man3/pthread_create.3 | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index 66c67a6ff..fd6253bf4 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -200,23 +200,8 @@ .SH NOTES
 If the
 .B RLIMIT_STACK
 resource limit is set to "unlimited",
-a per-architecture value is used for the stack size.
-Here is the value for a few architectures:
-.RS
-.TS
-allbox;
-lb lb
-l r.
-Architecture	Default stack size
-i386	2 MB
-IA-64	32 MB
-PowerPC	4 MB
-S/390	2 MB
-Sparc-32	2 MB
-Sparc-64	4 MB
-x86_64	2 MB
-.TE
-.RE
+a per-architecture value is used for the stack size:
+2 MB on most architectures; 4 MB on POWER and Sparc-64.
 .SH BUGS
 In the obsolete LinuxThreads implementation,
 each of the threads in a process has a different process ID.
-- 
2.39.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] pthread_create.3: re-do the architecture/default stack size mapping
  2024-02-11 22:27       ` [PATCH v2] " наб
@ 2024-02-11 23:50         ` Alejandro Colomar
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Colomar @ 2024-02-11 23:50 UTC (permalink / raw)
  To: наб; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 3288 bytes --]

Hi наб,

On Sun, Feb 11, 2024 at 11:27:46PM +0100, наб wrote:
> Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
> old PowerPC only, and most egregiously itanium,
> which linux doesn't target.
> 
> Per glibc 2.38:
>   $ git grep ARCH_STACK_DEFAULT_SIZE
>   aarch64     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   arc         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   arm         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   csky        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   loongarch   #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   m68k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   microblaze  #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   mips        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   nios2       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   or1k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   riscv       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   s390        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   sh          #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   sparc32     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
>   x86         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
> 
>   alpha       #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
>   powerpc     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
>   sparc64     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
> 
>   hppa        #define ARCH_STACK_DEFAULT_SIZE  (8 * 1024 * 1024)
> 
>   ia64        #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)
> 
> I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
> respectively, and AFAICT they haven't seen a processor released
> in over a decade, they aren't relevant to any modern reader.
> 
> Similarly, use "POWER" instead of "PowerPC" ‒ the consensus branding
> is "POWER"+version (POWER8/POWER9); PowerPC is itself a POWER variant
> and doesn't really deserve its own special mention, especially in 2024.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

Patch applied.  Thanks.

Have a lovely night!
Alex

> ---
>  man3/pthread_create.3 | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
> index 66c67a6ff..fd6253bf4 100644
> --- a/man3/pthread_create.3
> +++ b/man3/pthread_create.3
> @@ -200,23 +200,8 @@ .SH NOTES
>  If the
>  .B RLIMIT_STACK
>  resource limit is set to "unlimited",
> -a per-architecture value is used for the stack size.
> -Here is the value for a few architectures:
> -.RS
> -.TS
> -allbox;
> -lb lb
> -l r.
> -Architecture	Default stack size
> -i386	2 MB
> -IA-64	32 MB
> -PowerPC	4 MB
> -S/390	2 MB
> -Sparc-32	2 MB
> -Sparc-64	4 MB
> -x86_64	2 MB
> -.TE
> -.RE
> +a per-architecture value is used for the stack size:
> +2 MB on most architectures; 4 MB on POWER and Sparc-64.
>  .SH BUGS
>  In the obsolete LinuxThreads implementation,
>  each of the threads in a process has a different process ID.
> -- 
> 2.39.2



-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-11 23:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 20:43 [PATCH] pthread_create.3: re-do the architecture/default stack size mapping наб
2024-02-11 18:56 ` Alejandro Colomar
2024-02-11 20:00   ` наб
2024-02-11 20:37     ` Alejandro Colomar
2024-02-11 22:27       ` [PATCH v2] " наб
2024-02-11 23:50         ` Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.