From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121292 invoked by alias); 3 Apr 2017 17:00:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 121277 invoked by uid 89); 3 Apr 2017 17:00:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=macbook X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Apr 2017 17:00:48 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E62E785376; Mon, 3 Apr 2017 17:00:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E62E785376 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E62E785376 Received: from tucnak.zalov.cz (ovpn-116-72.ams2.redhat.com [10.36.116.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F6655C890; Mon, 3 Apr 2017 17:00:47 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v33H0idh022387; Mon, 3 Apr 2017 19:00:44 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v33H0gwk022386; Mon, 3 Apr 2017 19:00:42 +0200 Date: Mon, 03 Apr 2017 17:00:00 -0000 From: Jakub Jelinek To: Jeff Law Cc: "Dominique =?iso-8859-1?Q?d'Humi=E8res?=" , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Bump the default thread stack size on Darwin in libgomp (PR libgomp/79876) Message-ID: <20170403170042.GE17461@tucnak> Reply-To: Jakub Jelinek References: <20170401122418.GU17461@tucnak> <72fda698-ef0c-c1b3-9aef-6fa5cde859a5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72fda698-ef0c-c1b3-9aef-6fa5cde859a5@redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00092.txt.bz2 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 > > > > 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