unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ken Raeburn <raeburn@raeburn.org>
Cc: guile-devel@gnu.org
Subject: Re: [BDW-GC] Static allocation of subrs
Date: Mon, 02 Feb 2009 09:42:56 +0100	[thread overview]
Message-ID: <87k5896xgv.fsf@gnu.org> (raw)
In-Reply-To: <77A87EC6-5495-4F14-9AEB-3489B3AC0210@raeburn.org> (Ken Raeburn's message of "Mon\, 2 Feb 2009 00\:42\:57 -0500")

Hello Ken,

[Cc: guile-devel.]

Ken Raeburn <raeburn@raeburn.org> writes:

> On Jan 31, 2009, at 16:43, Ludovic Courtès wrote:
>> I ran `gcbench.scm' with both BDW-GC branches and didn't observe any
>> significant difference.  The benefits are that (i) initialization
>> should
>> be slightly faster, and (ii) running several instances of guile should
>> consume less memory since statically allocated data can be mapped
>> read-only by the loader and, consequently, the underlying physical
>> memory can be shared across instances.
>
> I've only looked at some of the sources, not built it (various missing
> dependencies, and I don't have much time to play with guile anyways),
> but I'm not sure this is the case.  For the main program, perhaps, but
> the library is generally built as a shared library, which won't have a
> fixed address; anything with addresses in it needs to be adjusted by
> the dynamic loader.

Ah ah, you're right: item (ii) is indeed wrong.  This statically
allocated data needs to be relocated, so it ends up in the
`.data.rel.ro' section, which is initially mapped read-write by the
loader and modified according to the relocations (linking with GNU ld's
"-z relro" forces this memory region to be mprotect()d read-only as soon
as relocations have been processed), so there's no sharing among
multiple guile instances.

(I realized this while rereading Drepper's `dsohowto.pdf'.)

Thanks,
Ludo'.




  parent reply	other threads:[~2009-02-02  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 21:43 [BDW-GC] Static allocation of subrs Ludovic Courtès
     [not found] ` <77A87EC6-5495-4F14-9AEB-3489B3AC0210@raeburn.org>
2009-02-02  8:42   ` Ludovic Courtès [this message]
2009-02-02 21:48 ` Neil Jerram
2009-02-02 23:38   ` Ludovic Courtès
2009-02-03 20:13     ` Neil Jerram
2009-03-16 18:17       ` Ludovic Courtès
2009-02-11 23:19     ` Ludovic Courtès

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=87k5896xgv.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    /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).