From: Ethan Grammatikidis <eekee57@fastmail.fm>
To: 9fans@9fans.net
Subject: Re: [9fans] automatic page sharing
Date: Thu, 29 Oct 2009 23:25:35 +0000 [thread overview]
Message-ID: <20091029232535.af075d27.eekee57@fastmail.fm> (raw)
In-Reply-To: <4AE9FA57.20305@metux.de>
On Thu, 29 Oct 2009 21:25:59 +0100
Enrico Weigelt <weigelt@metux.de> wrote:
> Russ Cox wrote:
>
> Hi,
>
> >> Assuming statically linked-in libraries are properly aligned,
> >> we'll have lots of equal pages in the system, so the kernel could
> >> find and automatically map them together.
> >
> > This is not true. When static libraries are linked into
> > a target binary, only the necessary objects are taken,
> > and all the symbol references are resolved (avoiding
> > the need for relocation at load time), and the code is
> > not position-independent. So even if they were "properly
> > aligned", the bits of common code would be very small.
>
> Assuming PIC, of course ;-)
>
> My idea is to get rid of mmap() for shared libraries but w/o
> loosing the code sharing behind the scenes.
Pardon if this has come up before, but what about the greatly
increased time taken to launch a shared-lib program? That's quite
unsuitable for the typical unix commands intended to be used
repeatedly, and produces unacceptable load times for apps depending on
many libraries. I remember Gnome and KDE just before pre-linking was
introduced, they weren't fun. Are you planning to incorporate
pre-linking or something like it to offset this disadvantage?
Shared libs are like object-oriented programming languages: they allow
you to introduce much greater complexity to a single program but bring
disadvantages too. There are other ways to deal with the problem such
as (on Plan 9) breaking up the program into servers or commands +
front end, a solution which may also greatly increase the flexibility
of the application.
--
Ethan Grammatikidis
Those who are slower at parsing information must
necessarily be faster at problem-solving.
next prev parent reply other threads:[~2009-10-29 23:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 17:05 Enrico Weigelt
2009-04-18 17:46 ` tlaronde
2009-04-28 22:19 ` Russ Cox
2009-10-29 20:25 ` Enrico Weigelt
2009-10-29 23:25 ` Ethan Grammatikidis [this message]
2009-10-30 9:57 ` Gorka Guardiola
[not found] <<20091029232535.af075d27.eekee57@fastmail.fm>
2009-10-30 0:22 ` erik quanstrom
2009-10-30 0:39 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2009-10-30 10:11 ` Richard Miller
[not found] <<599f06db0910300257v4fef540eid5626e2ba7c798ec@mail.gmail.com>
2009-10-30 14:14 ` erik quanstrom
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091029232535.af075d27.eekee57@fastmail.fm \
--to=eekee57@fastmail.fm \
--cc=9fans@9fans.net \
/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 NNTP newsgroup(s).