From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: GC improvements Date: Wed, 04 Jan 2006 17:18:22 +0100 Organization: LAAS-CNRS Message-ID: <87oe2snf01.fsf@laas.fr> References: <87slsnk9u0.fsf@laas.fr> <87mzid62hn.fsf@laas.fr> <43BB1EDF.7080404@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136397433 31839 80.91.229.2 (4 Jan 2006 17:57:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 17:57:13 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 04 18:57:02 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuCsb-0006Qe-Kv for guile-devel@m.gmane.org; Wed, 04 Jan 2006 18:56:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuCuI-0001uw-0P for guile-devel@m.gmane.org; Wed, 04 Jan 2006 12:58:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuBNJ-0008DT-1j for guile-devel@gnu.org; Wed, 04 Jan 2006 11:20:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuBNE-0008Cn-KY for guile-devel@gnu.org; Wed, 04 Jan 2006 11:20:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuBND-0008Ci-Nc for guile-devel@gnu.org; Wed, 04 Jan 2006 11:20:28 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EuBOd-0002nK-QZ for guile-devel@gnu.org; Wed, 04 Jan 2006 11:21:56 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k04GIZIL004706; Wed, 4 Jan 2006 17:18:36 +0100 (CET) Original-To: Han-Wen Nienhuys X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 15 =?iso-8859-1?Q?Niv=F4se?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Han-Wen Nienhuys , guile-devel@gnu.org In-Reply-To: <43BB1EDF.7080404@xs4all.nl> (Han-Wen Nienhuys's message of "Wed, 04 Jan 2006 02:03:27 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5576 Archived-At: Hi Han-Wen, Thanks for your input! Han-Wen Nienhuys writes: > the easiest way is to modify > > scm_gc_for_newcell() > > > so it directly passes to the > > scm_i_get_new_heap_segment (freelist, abort_on_error); > > case No, that won't have any impact because this very case is rarely reached. I checked this by adding two (static) counters to `scm_gc_for_newcell ()': one that counts the number of calls, and one that counts the number of non-EOL returns of the first `scm_i_sweep_some_segments ()' call. The ratio (still for the same workload) is _always_ very, very close to 1. This is because `scm_i_sweep_some_segments ()' does not actually only sweep segments: it sometimes (actually here, most of the time) *initializes* them. The reason is that it uses `scm_i_sweep_some_cards ()' which in turn chooses whether to initialize or sweep depending on whether the segment at hand is already initialized (SWEEPER is chosen based on SEG->FIRST_TIME). This interleaving of initialization and sweeping makes it pretty hard to track exactly where fresh cells come from. I guess one solution might be to maintain a list of the uninitialized segments and pick cells directly from there before actually sweeping. To be continued... Hopefully! ;-) Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel