From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dirk Herrmann Newsgroups: gmane.lisp.guile.devel Subject: Re: GUILE GC -- Write barrier for vectors Date: Mon, 15 Jul 2002 18:49:58 +0200 (CEST) Sender: guile-devel-admin@gnu.org Message-ID: References: <15665.63423.468913.715296@blauw.xs4all.nl> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1026751900 22843 127.0.0.1 (15 Jul 2002 16:51:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 15 Jul 2002 16:51:40 +0000 (UTC) Cc: guile-devel@gnu.org, jantien@xs4all.nl Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17U94U-0005wC-00 for ; Mon, 15 Jul 2002 18:51:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17U942-0006AU-00; Mon, 15 Jul 2002 12:51:10 -0400 Original-Received: from sallust.ida.ing.tu-bs.de ([134.169.132.52]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17U92z-00069I-00 for ; Mon, 15 Jul 2002 12:50:06 -0400 Original-Received: from localhost (dirk@localhost) by sallust.ida.ing.tu-bs.de (8.9.3+Sun/8.9.1) with ESMTP id SAA26083; Mon, 15 Jul 2002 18:49:58 +0200 (CEST) Original-To: hanwen@cs.uu.nl In-Reply-To: <15665.63423.468913.715296@blauw.xs4all.nl> Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:803 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:803 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