[RFC] nptl: change default stack guard size of threads

Florian Weimer fweimer@redhat.com
Wed Nov 29 15:18:00 GMT 2017


On 11/29/2017 03:59 PM, Szabolcs Nagy wrote:
> The change can be made for aarch64 only

That doesn't seem to be the case, looking at the patch.

So what you intended to do, exactly?

A 64 KiB probe interval on legacy 32-bit architectures is really a 
no-go.  It means we have to increase the guard region size to 64 KiB. 
But we cannot do that: The guard allocation comes out of the overall 
thread stack size, and existing applications do not expect that 60K of 
configured stack suddenly becomes unavailable.  Adding the guard size on 
top of the allocation will break setups which are carefully tuned for a 
maximum number of threads.

And that's what people actually do.  Here's an example:

“
  -Xss128k

Reduces the default maximum thread stack size, which allows more of the 
process' virtual memory address space to be used by the Java heap.
”

<http://www.oracle.com/technetwork/java/tuning-139912.html>

We can likely support 64 KiB probe intervals on 64-bit architectures. 
But given the impact on backwards compatibility, I really don't see the 
benefit on (legacy) 32-bit.

Thanks,
Florian



More information about the Libc-alpha mailing list