From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 27 20:43:59 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3DF1065670 for ; Sun, 27 Mar 2011 20:43:59 +0000 (UTC) (envelope-from jessefrgsmith@yahoo.ca) Received: from nm17-vm0.bullet.mail.bf1.yahoo.com (nm17-vm0.bullet.mail.bf1.yahoo.com [98.139.213.157]) by mx1.freebsd.org (Postfix) with SMTP id B92178FC08 for ; Sun, 27 Mar 2011 20:43:58 +0000 (UTC) Received: from [98.139.212.144] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2011 20:30:03 -0000 Received: from [98.139.212.206] by tm1.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2011 20:30:03 -0000 Received: from [127.0.0.1] by omp1015.mail.bf1.yahoo.com with NNFMP; 27 Mar 2011 20:30:03 -0000 X-Yahoo-Newman-Id: 556425.77293.bm@omp1015.mail.bf1.yahoo.com Received: (qmail 45231 invoked from network); 27 Mar 2011 20:30:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=qNtced32vsRHWx86G3C7Td/9V5bVEhFVWUr5bR8KrFXgYhCiVdhQ+ju325FjOVe00ECAAy3qn0M0CyYvavERECr46TaWwRaxKLkypm78I3ZfJR8c5NKFqwsz7kZfWQAx2VkT3WIZ/jB6Ptkk7H3cR9UOtRodn6umFFsqKy2Q3pg= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1301257802; bh=ly7tNKoC7St0eGpmaBHgWEP9aJuMWbIN4lDvJz2uNCw=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=AWFSdvby4Lg4PlyU6dcpqTZoolonwdXNyaKiXPKCPO2L+X27XDCizxPPeLfXoqeW0I+uggSPvDpeVaBtHZCiBcmZdHUneUzUwTwEXbPgYIyYzJ5nv+KEoYaYqns9yh7whvzzjFX5FhrrAsi+VDeBVN/eI2sb8n1NlC7AEuAPW2M= Received: from [192.168.0.104] (jessefrgsmith@24.137.101.247 with plain) by smtp134.mail.mud.yahoo.com with SMTP; 27 Mar 2011 13:30:01 -0700 PDT X-Yahoo-SMTP: NPm1JouswBClX_uJxHJINmnKUpROdMKvLL0- X-YMail-OSG: m.c4FHkVM1lAvo462sz02spOXCws7Itmsi4K5pz4qkXk.ei tE8OPENI1P2XUVck6_rwF3XxtLRU38BB9GKEUJHsrg1.jmQXh8DcYf7jIAc9 sh1hqXd.3uV9kq4trgALxddN1A1M2laduaFDH23fGh6ow800C7DgX4e3ps.r vt9KjNEneo0RLZbNKvBiBChSPk8soI2EUSK8YsvJXi2J.0KvF9oGJh06EJgp Fmfw.F8YSc.nkR269qEGsLzahublF5CE8YwKqIrxNXPetQIrnnMH56yA11Fd WgJCxjUn.JldwOBW9Lp0h8EkmRS4dm5VVXbDnvH6oTx7.zp095WLeB4ZXRBm Oe9Bwr2N_AO9hZklLxvZsq0VNIiB7dhIsL41jX670odBkLg-- X-Yahoo-Newman-Property: ymail-3 From: Jesse Smith To: freebsd-hackers@freebsd.org In-Reply-To: References: <1301189037.4069.43.camel@hp-laptop> Content-Type: text/plain; charset="UTF-8" Date: Sun, 27 Mar 2011 17:29:20 -0300 Message-ID: <1301257760.2321.11.camel@hp-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Subject: Re: Prebind from OpenBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2011 20:43:59 -0000 -----Original Message----- From: Robert Watson To: Jesse Smith 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