This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Bump the default thread stack size on Darwin in libgomp (PR libgomp/79876)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]