public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: Zack Weinberg <zack@codesourcery.com>
Cc: Jeff Sturm <jsturm@one-point.com>, gcc@gcc.gnu.org
Subject: Re: Locality problems caused by size based allocation?
Date: Tue, 17 Dec 2002 21:01:00 -0000	[thread overview]
Message-ID: <DD0D98C8-122B-11D7-9564-000393575BCC@dberlin.org> (raw)
In-Reply-To: <87wum8i0zi.fsf@egil.codesourcery.com>


On Tuesday, December 17, 2002, at 08:12  PM, Zack Weinberg wrote:

> Daniel Berlin <dberlin@dberlin.org> writes:
>
>> On Tue, 17 Dec 2002, Jeff Sturm wrote:
>>> What exactly is "size based allocation"?
>> What ggc-page does, which is segregate objects based on size rather 
>> than
>> age or object type.
>>
>> This doesn't work well for RTL, for instance, where you have 3 (or 
>> was it
>> 2 or 4, i forget which) sizes of RTL, so size allocation guarantees 
>> that
>> in a linear walk of RTL, you'll end up moving across all different
>> random pages.
>
> FYI, I plan to address this particular issue after the New Year, by
> picking up Dave Miller's suggestion from awhile back to avoid ever
> allocating long-lived RTL, and then reverting RTL to obstacks -- but
> just one obstack, data on which lives only during calls to expand_body
> (or something like that).
obstacks aren't something we should revert to.
Implement a pool/subpool system like APR has, or copy the region stuff 
out of libbanshee/libcompat  (it does subregions and whatnot. It's 
actually part of a runtime system for a compiler based partly on gcc 
that does safe regions, so it's rather well implemented).  It will 
compile without problems and without anything outside that directory 
being needed (it has a name conflict in profile.[ch], but renaming 
works fine)
Obstacks just don't have enough flexibility or promise that we should 
go back to them.
It doesn't change the greater locality problem however.
I would think mark and sweep regions/pools (you can have subpools and 
whatnot, for per iteration things) per pass, one for rtl, and one for 
trees, would be a better idea.
>
> zw

  reply	other threads:[~2002-12-18  1:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-16 11:19 Daniel Berlin
2002-12-17 15:47 ` Jeff Sturm
2002-12-17 16:13   ` Daniel Berlin
2002-12-17 20:03     ` Zack Weinberg
2002-12-17 21:01       ` Daniel Berlin [this message]
2002-12-17 23:16     ` Jeff Sturm
2002-12-18  0:41       ` Zack Weinberg
2002-12-18 12:59         ` Jeff Sturm
2002-12-18  5:44     ` Fergus Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DD0D98C8-122B-11D7-9564-000393575BCC@dberlin.org \
    --to=dberlin@dberlin.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jsturm@one-point.com \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).