From owner-freebsd-current@FreeBSD.ORG Fri Mar 27 20:54:51 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6A72106566C for ; Fri, 27 Mar 2009 20:54:51 +0000 (UTC) (envelope-from prashant.vaibhav@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id A4DE48FC26 for ; Fri, 27 Mar 2009 20:54:51 +0000 (UTC) (envelope-from prashant.vaibhav@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1352155wfg.7 for ; Fri, 27 Mar 2009 13:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=ptLKZzyXuaNiwRhCLIsDgbWzgu9p8HZxTh245HYs60A=; b=vMTCvKapOrAZRXkb+Pkhebs8h3Tkop1hPBDXDKKJU1kiuirhV8egFE5ICiPlBMwmdn GmM3ZIMAVUcAO0SGxhWnnXJHHqRo9NOhMm8us+mE9Hn5xf44E87t7MjYvz192ke19Fym frJr6zeHRfdqWLj7xeqUFbu/1ycv2DazH6IsQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jVBo+uStcz8JRMmQyZ/SpTv/3iZ1XYtrMLin44+7kVE4/Y5lvVNqxC9r8442fY34gN A7RQRfTDKAWgOCK0vp8HCRgL9KFlUwlHU/toXuUBO7vE3exG08rii7HF55lWa45rai5u 7iQt4Qt7sIdHQwNnYUjClMasGwSQ4zWDG1b3o= MIME-Version: 1.0 Received: by 10.142.52.7 with SMTP id z7mr1048913wfz.260.1238187291562; Fri, 27 Mar 2009 13:54:51 -0700 (PDT) In-Reply-To: <2C3C7185-CB37-4067-B2A9-A03B5B288606@mac.com> References: <11609492.9579.1238167614335.JavaMail.root@vms070.mailsrvcs.net> <49CD0405.1060704@samsco.org> <49CD1B3D.3030103@samsco.org> <2C3C7185-CB37-4067-B2A9-A03B5B288606@mac.com> Date: Sat, 28 Mar 2009 02:24:51 +0530 Message-ID: <17560ccf0903271354w167e42f8sc9f76e3f92486814@mail.gmail.com> From: Prashant Vaibhav To: Chuck Swiger Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org Subject: Re: Improving the kernel/i386 timecounter performance (GSoC proposal) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 20:54:52 -0000 For those interested, XNU sources are available on watson also: http://fxr.watson.org/fxr/source/?v=xnu-1228 which doesn't need ADC login and has good cross-referencing of symbols. Latest is from darwin 9.0 corresponding to osx 10.5.0; there were a lot of changes to the vm part in 10.5.6 update. On Sat, Mar 28, 2009 at 12:46 AM, Chuck Swiger wrote: > Hi, Scott & all-- > > > On Mar 27, 2009, at 11:30 AM, Scott Long wrote: > >> Robert Watson wrote: >> >>> On Fri, 27 Mar 2009, Scott Long wrote: >>> >>>> I've been talking about this for years. All I need is help with the VM >>>> magic to create the page on fork. I also want two pages, one global for >>>> gettimeofday (and any other global data we can think of) and one per-process >>>> for static data like getpid/getgid. >>>> >>> FWIW, there are some variations in schemes across OS's -- one extreme is >>> the Linux approach, which actually exports a mini shared library in ELF >>> format on the shared page, providing implementations of various services >>> (such as entering system calls), time stuff, etc. Less extreme are the >>> shared pages offered on Mac OS X, etc. >>> >> >> Yes, but I'd like to start somewhere, and considering that it's been >> impossible in _5_ years to get the 30 minutes of Peter or JeffR or JHB >> time to get the basic VM magic done, I'm keeping my expectations as >> modest as possible. >> > > I'm not entirely sure how close the Mach/xnu and FreeBSD implementations of > pmap_* stuff are, but the xnu code for commpage stuff is here: > > > http://www.opensource.apple.com/darwinsource/Current/xnu-1228.9.59/osfmk/i386/pmap.c [pmap_commpage32_init(), > pmap_commpage64_init()] > > http://www.opensource.apple.com/darwinsource/Current/xnu-1228.9.59/osfmk/i386/commpage/ [all > :-)] > > http://www.opensource.apple.com/darwinsource/Current/xnu-1228.9.59/osfmk/i386/commpage/commpage_gettimeofday.s [but > this one in particular] > > http://www.opensource.apple.com/darwinsource/Current/xnu-1228.9.59/osfmk/vm/vm_shared_region.c [cf > "COMM PAGE" comments, vm_commpage_init()] > > http://www.opensource.apple.com/darwinsource/Current/xnu-1228.9.59/bsd/kern/kern_fork.c [fork_create_child(), > procdup(), uses of pmap_map_sharedpage()] > > [ ADC login might be needed, otherwise I think rwatson has been importing > xnu periodically for TrustedBSD or other work, and might be able to provide > similar pointers... ] > > Regards, > -- > -Chuck > >