From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17951 invoked by alias); 12 Oct 2007 08:57:28 -0000 Received: (qmail 17941 invoked by uid 22791); 12 Oct 2007 08:57:26 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 Oct 2007 08:57:19 +0000 Received: by nf-out-0910.google.com with SMTP id h3so677847nfh for ; Fri, 12 Oct 2007 01:57:16 -0700 (PDT) Received: by 10.86.89.4 with SMTP id m4mr2214912fgb.1192179436524; Fri, 12 Oct 2007 01:57:16 -0700 (PDT) Received: from scientist-2.local ( [195.176.178.209]) by mx.google.com with ESMTPS id k29sm887377fkk.2007.10.12.01.57.14 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Oct 2007 01:57:15 -0700 (PDT) Message-ID: <470F36E6.4090703@gnu.org> Date: Fri, 12 Oct 2007 08:57:00 -0000 From: Paolo Bonzini User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: GCC Patches , Tom Tromey Subject: Re: [incremental] Patch: FYI: initial threading in gcc References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2007-10/txt/msg00712.txt.bz2 > There are some limitations in the current patch. First, it assumes > pthreads and the existence of __thread. Fixing this is just some > boring configury, or perhaps figuring out how to re-use gthr* on the > host. (If __thread is not available, I plan to have the server fall > back to single-threaded mode.) Second, I haven't implemented PCH > support for thread-locals. Is there a way to do so, other than: 1) moving all globals to the heap or to GGC memory, so that they are at least in a shared address space 2) having each thread store a pointer to its heap-allocated data both in a thread-local variable, and in a global variable indexed by thread id. 3) having PCH look at the latter, and GCC using the former. I fear that the above might also mean implementing pointer-swizzling on PCH load, because you might need the same PCH in different threads. Great job! Paolo