From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 708 invoked by alias); 4 Jun 2002 14:05:47 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 627 invoked from network); 4 Jun 2002 14:05:45 -0000 Received: from unknown (HELO cygnus.equallogic.com) (65.170.102.10) by sources.redhat.com with SMTP; 4 Jun 2002 14:05:45 -0000 Received: from cygnus.equallogic.com (localhost.localdomain [127.0.0.1]) by cygnus.equallogic.com (8.11.6/8.11.6) with ESMTP id g54E5jp03610 for ; Tue, 4 Jun 2002 10:05:45 -0400 Received: from deneb.dev.equallogic.com (deneb.dev.equallogic.com [172.16.1.99]) by cygnus.equallogic.com (8.11.6/8.11.6) with ESMTP id g54E5ic03588; Tue, 4 Jun 2002 10:05:44 -0400 Received: from PKONING.equallogic.com (localhost.localdomain [127.0.0.1]) by deneb.dev.equallogic.com (8.11.6/8.11.6) with ESMTP id g54E5hx07636; Tue, 4 Jun 2002 10:05:44 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15612.51512.39000.908725@gargle.gargle.HOWL> Date: Tue, 04 Jun 2002 07:14:00 -0000 From: Paul Koning To: levon@movementarian.org Cc: ak@suse.de, rth@redhat.com, gcc@gcc.gnu.org Subject: Re: Speeding up GC References: <20020603180553.A13829@redhat.com.suse.lists.egcs> <20020604135344.GB52565@compsoc.man.ac.uk> X-SW-Source: 2002-06/txt/msg00205.txt.bz2 Excerpt of message (sent 4 June 2002) by John Levon: > On Tue, Jun 04, 2002 at 12:42:06PM +0200, Andi Kleen wrote: > > > Unfortunately changing pages to read only and back is rather expensive. > > Cheaper would be to expose the hardware's page dirty bit to user space > > and use it for this. Apparently some OS like Solaris support it already > > (at least that is what the relevant function in the boehm-gc suggest) > > I guess it could be added to Linux too. > > To be most useful that needs to be read/write interface so the dirty bit > can be reset after a full GC, since the GC only cares about > dirty-since-last-GC (variant of card marking), whereas the VM has other > purposes for the dirty bit. It looks possible on x86 at least, by > backing up the dirty bit for the VM's benefit into one of the pte bits > that seem to be unused, as far as I can tell... It also depends on having a *hardware* dirty bit mechanism. I don't know about Sparc, but -- for example -- MIPS doesn't have any. You can simulate it by making the page read-only and taking the page fault on the first write, and indeed the documentation suggests this and describes how an OS could do it. That of course wouldn't be all that cheap. paul