From owner-freebsd-current@FreeBSD.ORG Sat Sep 18 08:10:15 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C01106566B; Sat, 18 Sep 2010 08:10:15 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5A58FC0A; Sat, 18 Sep 2010 08:10:15 +0000 (UTC) Received: from b.earth.lavabit.com (b.earth.lavabit.com [192.168.111.11]) by karen.lavabit.com (Postfix) with ESMTP id A090311B886; Sat, 18 Sep 2010 03:10:14 -0500 (CDT) Received: from rui-macbook.lan (83.144.140.56) by lavabit.com with ESMTP id 0EHP40G978KT; Sat, 18 Sep 2010 03:10:14 -0500 References: <4C92C815.7070508@scsiguy.com> <1801A881-E1C8-4B41-AD14-940686A37A27@FreeBSD.org> <57D2C852-4A1E-41AC-8074-BBBA8E0E7DCF@FreeBSD.org> <4C938AEE.2080006@scsiguy.com> In-Reply-To: <4C938AEE.2080006@scsiguy.com> Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Message-Id: <0DB67CB1-B2E3-487D-A7DB-E11D6778C62D@freebsd.org> Content-Transfer-Encoding: quoted-printable From: Rui Paulo Date: Sat, 18 Sep 2010 09:10:11 +0100 To: Justin T. Gibbs X-Mailer: Apple Mail (2.1081) Cc: "current@freebsd.org Current" , xen@freebsd.org Subject: Re: CFT - Xen infrastructure and block I/O improvements 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: Sat, 18 Sep 2010 08:10:15 -0000 On 17 Sep 2010, at 16:36, Justin T. Gibbs wrote: > On 9/17/2010 1:27 AM, Rui Paulo wrote: >> On 17 Sep 2010, at 07:55, Rui Paulo wrote: >>=20 >>> On 17 Sep 2010, at 02:44, Justin T. Gibbs wrote: >>>=20 >>>> At Spectra Logic, we are using FreeBSD amd64 under Xen to serve = storage >>>> to other Xen domains. Over the past 9 months, we've made several = changes >>>> to FreeBSD's Xen support. These include: >=20 > ... >=20 >>> Justin, this is quite a big diff (16k lines). I wonder if you can = create >>> separate diffs (xenstore, blkback, xenbus, etc.) for easier review = and >>> commenting. >>=20 >> '... and comment'. >=20 > The bulk of the patch is due to code reorganization. Unfortunately = SVN > doesn't reflect the copies properly in a diff, but at least the diff = will > apply properly even in a non-SVN backed source tree. This original = patch > should be the best for testers. >=20 > The following SVN operations were made to the source tree to clean up = it's > organization and to import functionality from the vendor (1 file): >=20 > # Does not apply to FreeBSD's NewBus method for dealing with XenBus = devices > svn delete sys/xen/xenbus/init.txt >=20 > # Linux version of backend XenBus service routines. Never ported to = FreeBSD. > # OBE: See xenbusb.c, xenbusb_if.m, xenbusb_front.c xenbusb_back.c > svn delete sys/xen/xenbus/xenbus_probe_backend.c >=20 > # Split XenStore into its own tree. XenBus is a software layer built = on top > # of XenStore. The old arrangement and the naming of some structures = and > # functions blurred these lines making it difficult to discern what = services > # are provided by which layer and what times these services are = available > # (e.g. during system startup and shutdown). > mkdir sys/xen/xenstore > svn add sys/xen/xenstore > svn move sys/xen/xenbus/xenbus_dev.c sys/xen/xenstore/xenstore_dev.c > svn copy sys/xen/xenbus/xenbusvar.h sys/xen/xenstore/xenstorevar.h > svn move sys/xen/xenbus/xenbus_xs.c sys/xen/xenstore/xenstore.c >=20 > # Split up XenBus code into methods available for use by client > # drivers (xenbus.c) and code used by the XenBus "bus code" to > # enumerate, attach, detach, and service bus drivers. > svn move sys/xen/xenbus/xenbus_client.c sys/xen/xenbus/xenbus.c > svn move sys/xen/xenbus/xenbus_probe.c sys/xen/xenbus/xenbusb.c > svn copy sys/xen/xenbus/xenbusb.c sys/xen/xenbus/xenbusb.h >=20 > # Merged with xenstore.c > svn delete sys/xen/xenbus/xenbus_comms.c > svn delete sys/xen/xenbus/xenbus_comms.h >=20 > # Merged with new XenBus control driver > mkdir sys/dev/xen/control > svn add sys/dev/xen/control > svn move sys/xen/reboot.c sys/dev/xen/control/control.c >=20 > # New file from Xen vendor with macros and structures used by > # a block back driver to service requires from a VM running a > # different ABI (e.g. amd64 back with i386 front). > svn add sys/xen/blkif.h >=20 > These alone account for 6k lines of svn diff. >=20 > A diff against a tree with these operations already made may make more = sense > to a reviewer. You can download this diff from here: >=20 > = http://people.FreeBSD.org/~gibbs/FreeBSD-head-xen_post-svn-ops_2010-09-17_= diffs.txt >=20 > It isn't much shorter since the additional context has amplified the = changes. > The bulk is largely caused by refactoring, and comments. It will > probably be easier to just review the files in sys/xen/xenstore and > sys/xen/xenbus in their entirety, but the comments bellow (boiled down = from > our SCM system), when coupled with the diffs, should give you enough = information > to understand the intentions behind the changes. Oh, IC. It's still pretty large and I don't have the necessary time, but = it appears that this is good to go (am afraid the past people who have = worked on Xen are now gone, no?). -- Rui Paulo