Re: [PATCH] use -prefer-non-pic on x86-{freebsd,linux}
| From: | Joe Orton | Date: | Thu, 16 Sep 2004 10:15:31 +0000 |
| Subject: | Re: [PATCH] use -prefer-non-pic on x86-{freebsd,linux} | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-12856@lists.php.net to get a copy of this message | ||
On Thu, Sep 16, 2004 at 11:53:40AM +0200, Sascha Schumann wrote:
> On Thu, 16 Sep 2004, Joe Orton wrote:
> >This is Rasmus' patch but only enabled on platforms where it's known to
> >work. Applies to HEAD: the apache2handler SAPI builds and loads a
> >shared extension OK like this on Linux/i686. It looks like some people
> >preferred a configure flag for this and some preferred to do it by
> >default. Consensus?
>
> It needs to be optional. Otherwise, the DSO cannot be shared
> across multiple independent Apache instances (which is the
> main reason this has not been enabled for years).
My understanding is that a single DSO on disk can be "shared" between
two instances, but the text sections of such will not be shared in
physical RAM between two instances which load it, because the code will
get fixed up and hence copied-on-write. Is that not the case?
So the trade-off for the default is between a performance hit in, I'd
say, by far the the normal case (running a single Apache instance), or a
memory hit in the less common case of running >1 instance concurrently.
joe