unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>
Cc: guile-devel@gnu.org, jantien@xs4all.nl
Subject: Re: GUILE GC -- Write barrier for vectors
Date: Mon, 15 Jul 2002 18:49:58 +0200 (CEST)	[thread overview]
Message-ID: <Pine.GSO.4.05.10207151822480.26074-100000@sallust.ida.ing.tu-bs.de> (raw)
In-Reply-To: <15665.63423.468913.715296@blauw.xs4all.nl>

On Mon, 15 Jul 2002 hanwen@cs.uu.nl wrote:

> Linked against 1.7.0 without-threads, lily uses approximately 20% of
> its time in GC on a 400 mhz PII/SDRAM. In another instance, the same
> compile with lilypond linked against 1.5.6 on a 1Ghz PIII/DDR RDRAM,
> uses approximately 50% of the total running time (!) for GC'ing.

Marius has cleaned up the memory interface.  During this step, a couple of
bugs were removed, where guile reports too much memory being allocated to
the gc.  This caused the gc to be called more often than necessary.  You
can find some details under workbook/gc/memory.text.  Possibly these
changes account for part of the difference between CVS (1.7.0 ?) and
1.5.6.

> In any case, it seems that there is room for improvement on the GUILE
> side, and one of these would be generational GC.

Right.  I think Michael Livshin has already thought about that issue.  You
should probably contact him to share ideas.  I think, summarizing all
thoughts in workbook will be quite helpful.

> Also, smobs and maybe some other types (which ones? structs?), are
> always assumed to have been changed, since they are outside of GC's
> control. It would probably be best to allocate them from a different
> pool so that they won't poison the normal generations, but that would
> require a slight extension of the GUILE API.

Do you have a suggestion for such an extension?

> As a prelude, I tried to add a "soft" write barrier to the vector
> code, by returning a const* in SCM_VELTS, and fixing where it goes
> wrong. The cell codes already have this type of write barrier. I then
> tried to fix up the remaining parts of the code. This is required by
> any gen GC code, IIRC.
[...]
> * I introduced the SCM_VECTOR_SET macro, ie
> 
> 	SCM_VECTOR_SET(vec,idx,value);
> 
> must be used for assignment.

Great.  This is a very good change, not just for the sake of gengc.

> * Direct write access to a vector must be done through the macro
> SCM_WRITABLE_VELTS.

Hmmm?  Where should this be necessary?  Do you want to modify the vector
cell itself, or are you using this for "speed ups"?  In the "speed-up"
case:  wouldn't SCM_VECTOR_SET do as well, given that the compiler can
extract constant expressions from within loops?

Btw:  We should also try to get rid of SCM_CARLOC and SCM_CDRLOC in this
context...

> * I ran a GC test just to verify that it was working, but I would
> really like to run the test-suite; I think that the following is a
> disgrace:

Well, can't tell you about this one, since I am personally not doing
"make check" but rather "./check-guile" from the guile-core directory.

> * Will this patch be integrated into CVS?  The FSF already has
>   disclaimers for me.

I have not looked into the patch yet, but I think that the SCM_VECTOR_SET
patch as you describe it is probably the right thing to do.  I am not sure
about the need for SCM_WRITABLE_VELTS, but I think we can discuss this
one.  In any case, it would be great if you could contact Michael Livshin.

> * Et ceteram censeo GUILE 1.6 releasem esse
:-)

Best regards,
Dirk Herrmann


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  parent reply	other threads:[~2002-07-15 16:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-14 22:14 GUILE GC -- Write barrier for vectors hanwen
2002-07-15 10:56 ` Miroslav Silovic
2002-07-15 11:00   ` Han-Wen Nienhuys
2002-07-15 11:36     ` Miroslav Silovic
2002-07-15 16:49 ` Dirk Herrmann [this message]
2002-07-15 18:22   ` Han-Wen Nienhuys
2002-07-15 20:07     ` Dirk Herrmann
2002-07-15 23:02       ` Han-Wen
2002-07-16  9:22         ` Han-Wen Nienhuys
2002-07-16 23:04         ` Dirk Herrmann
2002-07-16 23:26           ` Han-Wen
2002-07-17 21:53           ` Han-Wen
2002-07-19 23:48             ` Dirk Herrmann

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=Pine.GSO.4.05.10207151822480.26074-100000@sallust.ida.ing.tu-bs.de \
    --to=dirk@sallust.ida.ing.tu-bs.de \
    --cc=guile-devel@gnu.org \
    --cc=jantien@xs4all.nl \
    /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).