This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Bump the default thread stack size on Darwin in libgomp (PR libgomp/79876)
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Apr 2017 11:20:49 +0200
- Subject: Re: [PATCH] Bump the default thread stack size on Darwin in libgomp (PR libgomp/79876)
- Authentication-results: sourceware.org; auth=none
- References: <20170401122418.GU17461@tucnak> <72fda698-ef0c-c1b3-9aef-6fa5cde859a5@redhat.com> <20170403170042.GE17461@tucnak>
> Le 3 avr. 2017 à 19:00, Jakub Jelinek <jakub@redhat.com> a écrit :
>
> On Mon, Apr 03, 2017 at 10:56:13AM -0600, Jeff Law wrote:
>> On 04/01/2017 06:24 AM, Jakub Jelinek wrote:
>>> Apparently Darwin has insane default stack size for pthread_create
>>> unless overridden through pthread_attr_setstacksize - 512kB, compared e.g.
>>> to Linux usual default of around 8MB. For typical OpenMP uses that is way
>>> too low, so the following patch is an attempt to bump it to 2MB just on
>>> Darwin, and on other targets keep the default. Everything can be in any
>>> case overridden through {,G}OMP_STACKSIZE env variables.
>>>
>>> Bootstrapped/regtested on x86_64-linux and i686-linux, can anyone please test it
>>> on darwin?
>>>
>>> 2017-04-01 Jakub Jelinek <jakub@redhat.com>
>>>
>>> PR libgomp/79876
>>> * config/posix/thread-stacksize.h: New file.
>>> * config/darwin/thread-stacksize.h: New file.
>>> * config/nvptx/thread-stacksize.h: New file.
>>> * env.c: Include thread-stacksize.h.
>>> (initialize_env): Initialize stacksize to GOMP_DEFAULT_STACKSIZE
>>> instead of 0. Call pthread_attr_setstacksize even if
>>> GOMP_DEFAULT_STACKSIZE is non-zero.
>> I've got a build started, but it's on an ancient macbook pro, so it'll take
>> a long time. Someone else with modern hardware could certainly get this
>> done faster :-)
>
> Dominique has already tested it on Darwin 16 and said he'll test on Darwin
> 10; I'm waiting for those results.
>
> Jakub
No problem with darwin10.
Dominique