From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27891 invoked by alias); 16 Aug 2012 14:59:35 -0000 Received: (qmail 27877 invoked by uid 22791); 16 Aug 2012 14:59:34 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Aug 2012 14:59:13 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7GExCVs001245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Aug 2012 10:59:12 -0400 Received: from tucnak.redhat.com (vpn1-6-89.ams2.redhat.com [10.36.6.89]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7GExAFl009279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Aug 2012 10:59:11 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id q7GEv601018204; Thu, 16 Aug 2012 16:57:06 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id q7GEv6FO018203; Thu, 16 Aug 2012 16:57:06 +0200 Date: Thu, 16 Aug 2012 14:59:00 -0000 From: Jakub Jelinek To: Richard Guenther Cc: Paolo Carlini , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Decrease integer-share-limit Message-ID: <20120816145705.GK1999@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <502D057A.9080302@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2012-08/txt/msg01072.txt.bz2 On Thu, Aug 16, 2012 at 04:44:03PM +0200, Richard Guenther wrote: > On Thu, 16 Aug 2012, Paolo Carlini wrote: > > On 08/16/2012 03:39 PM, Richard Guenther wrote: > > > This decreases the integer-share-limit to make sure the TREE_VEC we > > > allocate for the small cached integers has a reasonable size for > > > our GC memory allocator. > > Out of curiosity (just in case you hav two spare minutes) do you have any idea > > why this is so? I mean, naively one would think that allowing for any 8 bit > > constant would be a nice idea; puzzlingly, however the comment in the code > > says just "experimentation". I'm wondering if tweaking a bit the memory > > allocator itself could allow for the full 8 bit range without a big memory > > waste... > > The GC memory allocator works on "pages", there are not pages of > arbitrary size but only power-of-two sizes. It's hard to improve > the allocator here. The allocations are either power-of-two, or a couple of extra listed sizes. So, the alternative would be to add an extra size for the default integer share limit vector. See extra_order_size_table in ggc-page.c. Of course only provided there are many of those vectors. Jakub