Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2011 17:29:20 -0300
From:      Jesse Smith <jessefrgsmith@yahoo.ca>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Prebind from OpenBSD
Message-ID:  <1301257760.2321.11.camel@hp-laptop>
In-Reply-To: <alpine.BSF.2.00.1103272049440.50590@fledge.watson.org>
References:  <1301189037.4069.43.camel@hp-laptop> <alpine.BSF.2.00.1103272049440.50590@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----
From: Robert Watson <rwatson@FreeBSD.org>
To: Jesse Smith <jessefrgsmith@yahoo.ca>
Cc: freebsd-hackers@freebsd.org
Subject: Re: Prebind from OpenBSD
Date: Sun, 27 Mar 2011 20:54:18 +0100 (BST)

On Sat, 26 Mar 2011, Jesse Smith wrote:

> I'm interested in working on the "Port prebind from OpenBSD" project 
> mentioned on the FreeBSD Ideas page. ( 
> http://wiki.freebsd.org/IdeasPage#head-d28cdd95ca1755d5afe63d653cb4926d4bdc99de 
> )
>
> There isn't much to go on from the project description and I'm curious what 
> FreeBSD devs are looking for specifically. For example, should the entire 
> ldconfig program be ported from OpenBSD (it looks like it's close enough to 
> FreeBSD's to make that suitable), or should just the prebind code be merged 
> into FreeBSD's ldcnfig?
>
> Once the project is complete, who should the work be submitted to? Has 
> anyone else worked on this and made any progress?

Hi Jesse:

I think the intent of the ideas list entry is more a research project than a 
direct-to-commit project: the question is whether prebinding of some sort 
would observably help performance for important FreeBSD applications or, for 
example, the boot process.  If so, then certainly the OpenBSD prebinding code 
is a possible model -- Mac OS X also has prebinding, of course, and it's done 
quite differently (and probably less reusably from our perspective as they use 
Mach-O rather than ELF); however, there might be interesting ideas as well.

I think therefore I'd structure a project along the following lines: first, 
you want to establish to what extent synchronous waiting on linkage at 
run-time is a significant problem.  It could be that some combination of hwpmc 
and DTrace would be the right tools for this.  I'd especially pay attention to 
boot time, since we know that quite a lot of executing takes place then as 
part of rc.d.  I'd also investigate large applications like Firefox,
Chrome, 
KDE, Gnome, etc.  KDE already integrates prebinding tricks in its design, but 
I don't think the others do.

Next, I'd dig a bit more into the areas where it's hurting performance -- can 
you add up all the time spent waiting and cut 10 seconds from boot, or 5 
seconds from Firefox startup?  Or is the best win going to be .2 seconds in 
Firefox?  Does the OpenBSD optimisation actually address the problem we're 
experiencing?  Perhaps perform some experiments with prebinding-like 
behaviour, working up to an implementation.

It's worth remembering that prebinding comes with some baggage as well, of 
course.  Perhaps less relevant in the world of 64-bit address spaces, but 
there are some design trade-offs in this department...

Robert



Robert,

Thanks very much for the reply. I had thought this was a project/port
that was in progress, rather than something waiting on research. Do you
know if that's also the case with other projects on the Ideas list? A
lot of them don't have many details or contact information associated
with them. I'm especially interested in the OpenBSD xlint port.

I appreciate you time,
Jesse





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1301257760.2321.11.camel>