Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Switch from SBCL to Erlang backend due to scalability issues(GC).
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Frode Vatvedt Fjeld  
View profile  
 More options Mar 11 2007, 3:38 pm
Newsgroups: comp.lang.lisp
From: Frode Vatvedt Fjeld <fro...@cs.uit.no>
Date: 11 Mar 2007 20:38:22 +0100
Local: Sun, Mar 11 2007 3:38 pm
Subject: Re: Switch from SBCL to Erlang backend due to scalability issues(GC).

> > "bradb" <brad.beveri...@gmail.com> writes:
> > > It seems to me that it would be possible for the compiler to
> > > track Lisp/non-Lisp registers if it were required.  For example,
> > > you could store a word on the stack that had status bits
> > > determining what a register was used for.  Then when the GC
> > > scavenged the stack it would look at this word and choose which
> > > saved values were actually objects.  I'm curious if the scheme
> > > I've just outlined would actually work?

> On Mar 7, 3:36 pm, Frode Vatvedt Fjeld <fro...@cs.uit.no> wrote:
> > I've done this and it works fine (except it's not stored on the
> > stack, but the principle is the same). I think perhaps Corman Lisp
> > uses this technique also. There is of course an overhead to
> > consider, if you have to change these status bits very frequently
> > (like every few instructions), that can be prohibitive.
"bradb" <brad.beveri...@gmail.com> writes:
> Would you mind a small description on how you do this?  I was
> thinking that with the right kind of GC the status bits would only
> need updating before function calls.

Well, the resolution would typically be finer than a function. A
(thread-)global variable holds the register usage status (for example
there is one bit per register, indicating GC-root on/off). The
compiler will know whether it requires non-standard register usage,
and when required it emits instructions to set and re-set the
(thread-)global variable.

In my particular system (www.common-lisp.net/project/movitz) there are
exactly two modes of register usage: normal mode where all registers
except ECX are GC roots, and "secondary" mode where all registers
except EAX, ECX, and EDX are not GC roots (leaving EBX, ESI, and
EDI). Because there are two modes, only a single bit is required to
chose from them. An unused bit in the EFLAGS status register is used
for this. (Another, more heavy-weight, mechanism is used when this
scheme does not suffice.)

The same concept can be used for stack-frames, but here there would be
a per-function status variable. This could be a constant slot
associated with the function object, meaning there would be no extra
overhead in setting and re-setting the status bits.

--
Frode Vatvedt Fjeld


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.