From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 7 06:27:04 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 125AE106567E for ; Sun, 7 Sep 2008 06:27:04 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outS.internet-mail-service.net (outs.internet-mail-service.net [216.240.47.242]) by mx1.freebsd.org (Postfix) with ESMTP id EB2D08FC1C for ; Sun, 7 Sep 2008 06:27:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id E07B023FF; Sat, 6 Sep 2008 23:27:03 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 17F922D6087; Sat, 6 Sep 2008 23:27:03 -0700 (PDT) Message-ID: <48C3743D.9090503@elischer.org> Date: Sat, 06 Sep 2008 23:27:09 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec , FreeBSD virtualization mailing list Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 06:27:04 -0000 trying to replace VNET_ITERLOOP_{BEGIN,END} looking at an example: static void if_slowtimo(void *arg) { struct ifnet *ifp; IFNET_RLOCK(); VNET_ITERLOOP_BEGIN(); INIT_VNET_NET(curvnet); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_timer == 0 || --ifp->if_timer) continue; if (ifp->if_watchdog) (*ifp->if_watchdog)(ifp); } VNET_ITERLOOP_END(); IFNET_RUNLOCK(); timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); } If we expand this out we get: (reindented for readability) static void if_slowtimo(void *arg) { struct ifnet *ifp; IFNET_RLOCK(); struct vnet *vnet_iter; VNET_LIST_REF(); LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { struct vnet *saved_vnet = curvnet; curvnet = vnet_iter; INIT_VNET_NET(curvnet); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_timer == 0 || --ifp->if_timer) continue; if (ifp->if_watchdog) (*ifp->if_watchdog)(ifp); } curvnet = saved_vnet; } VNET_LIST_UNREF(); IFNET_RUNLOCK(); timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); } now several things leap out here.. (like, declaring variables in mid block) using different macros to try do this cleanly might lead to: static void if_slowtimo(void *arg) { struct ifnet *ifp; VNET_DECL(vnet_iter); VNET_DECL(saved_vnet); IFNET_RLOCK(); CURVNET_SAVE(saved_vnet); VNET_LIST_REF(); FOREACH_VNET(vnet_iter) { CURVNET_SET_QUIET(vnet_iter); INIT_VNET_NET(vnet_iter); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_timer == 0 || --ifp->if_timer) continue; if (ifp->if_watchdog) (*ifp->if_watchdog)(ifp); } } CURVNET_SET(vnet_hold); VNET_LIST_UNREF(); IFNET_RUNLOCK(); timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); } this adds a lot to the original.. I could see: using bigger macros, getting it back (size wise) to: static void if_slowtimo(void *arg) { struct ifnet *ifp; VNET_ITERATOR_DECL(vnet_iter, saved_vnet); IFNET_RLOCK(); FOREACH_VNET(vnet_iter, saved_vnet) { VNET_SWITCHTO(vnet_iter); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_timer == 0 || --ifp->if_timer) continue; if (ifp->if_watchdog) (*ifp->if_watchdog)(ifp); } } FOREACH_VNET_COMPLETE(saved_vnet); IFNET_RUNLOCK(); timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); } still bigger than the original macros though arguably more "C-like" anyone have better ways to express this? Brook, robert, bz? does this look better? Julian From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 7 06:33:43 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEC0C1065670 for ; Sun, 7 Sep 2008 06:33:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outD.internet-mail-service.net (outd.internet-mail-service.net [216.240.47.227]) by mx1.freebsd.org (Postfix) with ESMTP id 8E4FE8FC19 for ; Sun, 7 Sep 2008 06:33:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id C4ECA2374; Sat, 6 Sep 2008 23:33:43 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 8E0F02D6099; Sat, 6 Sep 2008 23:33:42 -0700 (PDT) Message-ID: <48C375CD.3010308@elischer.org> Date: Sat, 06 Sep 2008 23:33:49 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec , FreeBSD virtualization mailing list References: <48C3743D.9090503@elischer.org> In-Reply-To: <48C3743D.9090503@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 06:33:43 -0000 Julian Elischer wrote: oops.. with correct indenting and some slight renaming.. > > static void > if_slowtimo(void *arg) > { > struct ifnet *ifp; > VNET_ITERATOR_DECL(vnet_iter, saved_vnet); > > IFNET_RLOCK(); > VNET_FOREACH(vnet_iter, saved_vnet) { > VNET_SWITCHTO(vnet_iter); > TAILQ_FOREACH(ifp, &V_ifnet, if_link) { > if (ifp->if_timer == 0 || --ifp->if_timer) > continue; > if (ifp->if_watchdog) > (*ifp->if_watchdog)(ifp); > } > } > VNET_FOREACH_RESTORE(saved_vnet); > IFNET_RUNLOCK(); > timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); > } >\ From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 7 14:41:38 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 244AA10656C2 for ; Sun, 7 Sep 2008 14:41:38 +0000 (UTC) (envelope-from zec@freebsd.org) Received: from mail2.srv.carnet.hr (unknown [IPv6:2001:b68:e160:0:216:3eff:fe0f:f088]) by mx1.freebsd.org (Postfix) with ESMTP id 43DF78FC1D for ; Sun, 7 Sep 2008 14:41:37 +0000 (UTC) (envelope-from zec@freebsd.org) Received: from vipnet115-83.mobile.carnet.hr ([193.198.83.115]:60455) by mail2.srv.carnet.hr with esmtp (Exim 4.63) (envelope-from ) id 1KcLS7-0001dV-MQ; Sun, 07 Sep 2008 16:41:30 +0200 From: Marko Zec To: Julian Elischer Date: Sun, 7 Sep 2008 16:41:11 +0200 User-Agent: KMail/1.9.7 References: <48C3743D.9090503@elischer.org> In-Reply-To: <48C3743D.9090503@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809071641.11333.zec@freebsd.org> X-SA-Exim-Connect-IP: 193.198.83.115 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on arneb.carnet.hr X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,BAYES_50 autolearn=no version=3.2.3 X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) Cc: FreeBSD virtualization mailing list Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 14:41:38 -0000 On Sunday 07 September 2008 08:27:09 Julian Elischer wrote: > trying to replace VNET_ITERLOOP_{BEGIN,END} > > > > looking at an example: > > static void > if_slowtimo(void *arg) > { > struct ifnet *ifp; > > IFNET_RLOCK(); > VNET_ITERLOOP_BEGIN(); > INIT_VNET_NET(curvnet); > TAILQ_FOREACH(ifp, &V_ifnet, if_link) { > if (ifp->if_timer == 0 || --ifp->if_timer) > continue; > if (ifp->if_watchdog) > (*ifp->if_watchdog)(ifp); > } > VNET_ITERLOOP_END(); > IFNET_RUNLOCK(); > timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); > } > > > If we expand this out we get: (reindented for readability) > > static void > if_slowtimo(void *arg) > { > struct ifnet *ifp; > > IFNET_RLOCK(); > struct vnet *vnet_iter; > VNET_LIST_REF(); > LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { > struct vnet *saved_vnet = curvnet; > curvnet = vnet_iter; > INIT_VNET_NET(curvnet); > TAILQ_FOREACH(ifp, &V_ifnet, if_link) { > if (ifp->if_timer == 0 || --ifp->if_timer) > continue; > if (ifp->if_watchdog) > (*ifp->if_watchdog)(ifp); > } > curvnet = saved_vnet; > } > VNET_LIST_UNREF(); > IFNET_RUNLOCK(); > timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); > } > > now several things leap out here.. > (like, declaring variables in mid block) > using different macros to try do this cleanly might lead to: > > > > static void > if_slowtimo(void *arg) > { > struct ifnet *ifp; > VNET_DECL(vnet_iter); > VNET_DECL(saved_vnet); > > IFNET_RLOCK(); > CURVNET_SAVE(saved_vnet); > VNET_LIST_REF(); > FOREACH_VNET(vnet_iter) { > > CURVNET_SET_QUIET(vnet_iter); > INIT_VNET_NET(vnet_iter); > TAILQ_FOREACH(ifp, &V_ifnet, if_link) { > if (ifp->if_timer == 0 || --ifp->if_timer) > continue; > if (ifp->if_watchdog) > (*ifp->if_watchdog)(ifp); > } > } > CURVNET_SET(vnet_hold); > VNET_LIST_UNREF(); > IFNET_RUNLOCK(); > timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); > } > > this adds a lot to the original.. > > I could see: > > using bigger macros, getting it back (size wise) to: > > static void > if_slowtimo(void *arg) > { > struct ifnet *ifp; > VNET_ITERATOR_DECL(vnet_iter, saved_vnet); > > IFNET_RLOCK(); > FOREACH_VNET(vnet_iter, saved_vnet) { > VNET_SWITCHTO(vnet_iter); > TAILQ_FOREACH(ifp, &V_ifnet, if_link) { > if (ifp->if_timer == 0 || --ifp->if_timer) > continue; > if (ifp->if_watchdog) > (*ifp->if_watchdog)(ifp); > } > } > FOREACH_VNET_COMPLETE(saved_vnet); > IFNET_RUNLOCK(); > timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); > } > > still bigger than the original macros though arguably more "C-like" > > anyone have better ways to express this? > > Brook, robert, bz? does this look better? I don't think we need an explicit CURVNET_SAVE() in most of the places that iterate over the entire vnet list, because in functions where iteration takes place there's typically no vnet context set on entry. So perhaps a replacement for current VNET_ITERLOOP_BEGIN / VNET_ITERLOOP_END kludge looking like this could suffice: VNET_LIST_REF(); /* essentialy a RLOCK() */ VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); /* existing code chunk body, 1-tab indent prepended */ CURVNET_RESTORE(); } VNET_LIST_UNREF(); /* essentially a RUNLOCK() */ This could provide more insight into what's going on in the loop, while still allowing for all the macros to vanish in nooptions VIMAGE builds. Marko From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 7 15:34:16 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92FD7106564A for ; Sun, 7 Sep 2008 15:34:16 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outy.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id 7ABA18FC0A for ; Sun, 7 Sep 2008 15:34:16 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 662EA2433; Sun, 7 Sep 2008 08:34:16 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id B88762D60C9; Sun, 7 Sep 2008 08:34:15 -0700 (PDT) Message-ID: <48C3F47E.30407@elischer.org> Date: Sun, 07 Sep 2008 08:34:22 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec References: <48C3743D.9090503@elischer.org> <200809071641.11333.zec@freebsd.org> In-Reply-To: <200809071641.11333.zec@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization mailing list Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 15:34:16 -0000 Marko Zec wrote: > On Sunday 07 September 2008 08:27:09 Julian Elischer wrote: >> trying to replace VNET_ITERLOOP_{BEGIN,END} >> >> >> >> looking at an example: >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> >> IFNET_RLOCK(); >> VNET_ITERLOOP_BEGIN(); >> INIT_VNET_NET(curvnet); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> VNET_ITERLOOP_END(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> >> If we expand this out we get: (reindented for readability) >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> >> IFNET_RLOCK(); >> struct vnet *vnet_iter; >> VNET_LIST_REF(); >> LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { >> struct vnet *saved_vnet = curvnet; >> curvnet = vnet_iter; >> INIT_VNET_NET(curvnet); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> curvnet = saved_vnet; >> } >> VNET_LIST_UNREF(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> now several things leap out here.. >> (like, declaring variables in mid block) >> using different macros to try do this cleanly might lead to: >> >> >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> VNET_DECL(vnet_iter); >> VNET_DECL(saved_vnet); >> >> IFNET_RLOCK(); >> CURVNET_SAVE(saved_vnet); >> VNET_LIST_REF(); >> FOREACH_VNET(vnet_iter) { >> >> CURVNET_SET_QUIET(vnet_iter); >> INIT_VNET_NET(vnet_iter); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> } >> CURVNET_SET(vnet_hold); >> VNET_LIST_UNREF(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> this adds a lot to the original.. >> >> I could see: >> >> using bigger macros, getting it back (size wise) to: >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> VNET_ITERATOR_DECL(vnet_iter, saved_vnet); >> >> IFNET_RLOCK(); >> FOREACH_VNET(vnet_iter, saved_vnet) { >> VNET_SWITCHTO(vnet_iter); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> } >> FOREACH_VNET_COMPLETE(saved_vnet); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> still bigger than the original macros though arguably more "C-like" >> >> anyone have better ways to express this? >> >> Brook, robert, bz? does this look better? > > I don't think we need an explicit CURVNET_SAVE() in most of the places > that iterate over the entire vnet list, because in functions where > iteration takes place there's typically no vnet context set on entry. > > So perhaps a replacement for current VNET_ITERLOOP_BEGIN / > VNET_ITERLOOP_END kludge looking like this could suffice: > > VNET_LIST_REF(); /* essentialy a RLOCK() */ > VNET_FOREACH(vnet_iter) { vnet_iter is still being decalared mid block, which may be ok in current gcc but worries me. Also, we still need the INIT_VNET_XXX(curvnet) as well. > CURVNET_SET(vnet_iter); > /* existing code chunk body, 1-tab indent prepended */ > CURVNET_RESTORE(); > } > VNET_LIST_UNREF(); /* essentially a RUNLOCK() */ > > This could provide more insight into what's going on in the loop, while > still allowing for all the macros to vanish in nooptions VIMAGE builds. > > Marko > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 7 15:36:01 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB957106567D for ; Sun, 7 Sep 2008 15:36:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 99C398FC26 for ; Sun, 7 Sep 2008 15:36:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id E237A2433; Sun, 7 Sep 2008 08:36:03 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 8EF4F2D6004; Sun, 7 Sep 2008 08:36:00 -0700 (PDT) Message-ID: <48C3F4E7.6030507@elischer.org> Date: Sun, 07 Sep 2008 08:36:07 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec References: <48C3743D.9090503@elischer.org> <200809071641.11333.zec@freebsd.org> In-Reply-To: <200809071641.11333.zec@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization mailing list Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 15:36:01 -0000 Marko Zec wrote: > On Sunday 07 September 2008 08:27:09 Julian Elischer wrote: >> trying to replace VNET_ITERLOOP_{BEGIN,END} >> >> >> >> looking at an example: >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> >> IFNET_RLOCK(); >> VNET_ITERLOOP_BEGIN(); >> INIT_VNET_NET(curvnet); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> VNET_ITERLOOP_END(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> >> If we expand this out we get: (reindented for readability) >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> >> IFNET_RLOCK(); >> struct vnet *vnet_iter; >> VNET_LIST_REF(); >> LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { >> struct vnet *saved_vnet = curvnet; >> curvnet = vnet_iter; >> INIT_VNET_NET(curvnet); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> curvnet = saved_vnet; >> } >> VNET_LIST_UNREF(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> now several things leap out here.. >> (like, declaring variables in mid block) >> using different macros to try do this cleanly might lead to: >> >> >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> VNET_DECL(vnet_iter); >> VNET_DECL(saved_vnet); >> >> IFNET_RLOCK(); >> CURVNET_SAVE(saved_vnet); >> VNET_LIST_REF(); >> FOREACH_VNET(vnet_iter) { >> >> CURVNET_SET_QUIET(vnet_iter); >> INIT_VNET_NET(vnet_iter); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> } >> CURVNET_SET(vnet_hold); >> VNET_LIST_UNREF(); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> this adds a lot to the original.. >> >> I could see: >> >> using bigger macros, getting it back (size wise) to: >> >> static void >> if_slowtimo(void *arg) >> { >> struct ifnet *ifp; >> VNET_ITERATOR_DECL(vnet_iter, saved_vnet); >> >> IFNET_RLOCK(); >> FOREACH_VNET(vnet_iter, saved_vnet) { >> VNET_SWITCHTO(vnet_iter); >> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >> if (ifp->if_timer == 0 || --ifp->if_timer) >> continue; >> if (ifp->if_watchdog) >> (*ifp->if_watchdog)(ifp); >> } >> } >> FOREACH_VNET_COMPLETE(saved_vnet); >> IFNET_RUNLOCK(); >> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >> } >> >> still bigger than the original macros though arguably more "C-like" >> >> anyone have better ways to express this? >> >> Brook, robert, bz? does this look better? > > I don't think we need an explicit CURVNET_SAVE() in most of the places > that iterate over the entire vnet list, because in functions where > iteration takes place there's typically no vnet context set on entry. > > So perhaps a replacement for current VNET_ITERLOOP_BEGIN / > VNET_ITERLOOP_END kludge looking like this could suffice: > > VNET_LIST_REF(); /* essentialy a RLOCK() */ > VNET_FOREACH(vnet_iter) { > CURVNET_SET(vnet_iter); > /* existing code chunk body, 1-tab indent prepended */ > CURVNET_RESTORE(); > } > VNET_LIST_UNREF(); /* essentially a RUNLOCK() */ also. it it enough to just have a reference? is there a (rw)lock for the vimage list? > > This could provide more insight into what's going on in the loop, while > still allowing for all the macros to vanish in nooptions VIMAGE builds. > > Marko > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Mon Sep 8 14:27:09 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1FC106567E; Mon, 8 Sep 2008 14:27:09 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id CFD1C8FC1D; Mon, 8 Sep 2008 14:27:08 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.2) with ESMTP id m88ERv4G021100; Mon, 8 Sep 2008 09:27:57 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id m88ERvcJ021099; Mon, 8 Sep 2008 09:27:57 -0500 (CDT) (envelope-from brooks) Date: Mon, 8 Sep 2008 09:27:57 -0500 From: Brooks Davis To: Julian Elischer Message-ID: <20080908142757.GB20793@lor.one-eyed-alien.net> References: <48C3743D.9090503@elischer.org> <200809071641.11333.zec@freebsd.org> <48C3F47E.30407@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: <48C3F47E.30407@elischer.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Mon, 08 Sep 2008 09:27:57 -0500 (CDT) Cc: Marko Zec , FreeBSD virtualization mailing list Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 14:27:09 -0000 --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 07, 2008 at 08:34:22AM -0700, Julian Elischer wrote: > Marko Zec wrote: >> On Sunday 07 September 2008 08:27:09 Julian Elischer wrote: >>> trying to replace VNET_ITERLOOP_{BEGIN,END} >>>=20 >>>=20 >>>=20 >>> looking at an example: >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>>=20 >>> IFNET_RLOCK(); >>> VNET_ITERLOOP_BEGIN(); >>> INIT_VNET_NET(curvnet); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> VNET_ITERLOOP_END(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>>=20 >>> If we expand this out we get: (reindented for readability) >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>>=20 >>> IFNET_RLOCK(); >>> struct vnet *vnet_iter; >>> VNET_LIST_REF(); >>> LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { >>> struct vnet *saved_vnet =3D curvnet; >>> curvnet =3D vnet_iter; >>> INIT_VNET_NET(curvnet); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> curvnet =3D saved_vnet; >>> } >>> VNET_LIST_UNREF(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> now several things leap out here.. >>> (like, declaring variables in mid block) >>> using different macros to try do this cleanly might lead to: >>>=20 >>>=20 >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>> VNET_DECL(vnet_iter); >>> VNET_DECL(saved_vnet); >>>=20 >>> IFNET_RLOCK(); >>> CURVNET_SAVE(saved_vnet); >>> VNET_LIST_REF(); >>> FOREACH_VNET(vnet_iter) { >>>=20 >>> CURVNET_SET_QUIET(vnet_iter); >>> INIT_VNET_NET(vnet_iter); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> } >>> CURVNET_SET(vnet_hold); >>> VNET_LIST_UNREF(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> this adds a lot to the original.. >>>=20 >>> I could see: >>>=20 >>> using bigger macros, getting it back (size wise) to: >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>> VNET_ITERATOR_DECL(vnet_iter, saved_vnet); >>>=20 >>> IFNET_RLOCK(); >>> FOREACH_VNET(vnet_iter, saved_vnet) { >>> VNET_SWITCHTO(vnet_iter); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> } >>> FOREACH_VNET_COMPLETE(saved_vnet); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> still bigger than the original macros though arguably more "C-like" >>>=20 >>> anyone have better ways to express this? >>>=20 >>> Brook, robert, bz? does this look better? >>=20 >> I don't think we need an explicit CURVNET_SAVE() in most of the places= =20 >> that iterate over the entire vnet list, because in functions where=20 >> iteration takes place there's typically no vnet context set on entry. >>=20 >> So perhaps a replacement for current VNET_ITERLOOP_BEGIN /=20 >> VNET_ITERLOOP_END kludge looking like this could suffice: >>=20 >> VNET_LIST_REF(); /* essentialy a RLOCK() */ >> VNET_FOREACH(vnet_iter) { >=20 > vnet_iter is still being decalared mid block, which may be ok in current= =20 > gcc but worries me. > Also, we still need the INIT_VNET_XXX(curvnet) as well. I'd like to see some sort of VNET_ITERATOR_DECL(vnet_iter) at the top rather than the mid-block decleration. -- Brooks >=20 >> CURVNET_SET(vnet_iter); >> /* existing code chunk body, 1-tab indent prepended */ >> CURVNET_RESTORE(); >> } >> VNET_LIST_UNREF(); /* essentially a RUNLOCK() */ >>=20 >> This could provide more insight into what's going on in the loop, while= =20 >> still allowing for all the macros to vanish in nooptions VIMAGE builds. >>=20 >> Marko >> _______________________________________________ >> freebsd-virtualization@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization >> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fre= ebsd.org" >=20 > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free= bsd.org" --0eh6TmSyL6TZE2Uz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFIxTZsXY6L6fI4GtQRAuSYAKDoCS4/YKzmdK0GHcF6SpxI2MW6IwCeIEcC rbm9ofeiubZ6cxR7t44ZzWk= =tZg4 -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz-- From owner-freebsd-virtualization@FreeBSD.ORG Mon Sep 8 14:29:15 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E10E1106567D; Mon, 8 Sep 2008 14:29:15 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 606268FC17; Mon, 8 Sep 2008 14:29:15 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.2) with ESMTP id m88EU4aQ021138; Mon, 8 Sep 2008 09:30:04 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id m88EU4im021137; Mon, 8 Sep 2008 09:30:04 -0500 (CDT) (envelope-from brooks) Date: Mon, 8 Sep 2008 09:30:04 -0500 From: Brooks Davis To: Julian Elischer Message-ID: <20080908143004.GC20793@lor.one-eyed-alien.net> References: <48C3743D.9090503@elischer.org> <200809071641.11333.zec@freebsd.org> <48C3F4E7.6030507@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s9fJI615cBHmzTOP" Content-Disposition: inline In-Reply-To: <48C3F4E7.6030507@elischer.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Mon, 08 Sep 2008 09:30:04 -0500 (CDT) Cc: Marko Zec , FreeBSD virtualization mailing list Subject: Re: FOREACH_VNET... X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 14:29:16 -0000 --s9fJI615cBHmzTOP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 07, 2008 at 08:36:07AM -0700, Julian Elischer wrote: > Marko Zec wrote: >> On Sunday 07 September 2008 08:27:09 Julian Elischer wrote: >>> trying to replace VNET_ITERLOOP_{BEGIN,END} >>>=20 >>>=20 >>>=20 >>> looking at an example: >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>>=20 >>> IFNET_RLOCK(); >>> VNET_ITERLOOP_BEGIN(); >>> INIT_VNET_NET(curvnet); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> VNET_ITERLOOP_END(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>>=20 >>> If we expand this out we get: (reindented for readability) >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>>=20 >>> IFNET_RLOCK(); >>> struct vnet *vnet_iter; >>> VNET_LIST_REF(); >>> LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { >>> struct vnet *saved_vnet =3D curvnet; >>> curvnet =3D vnet_iter; >>> INIT_VNET_NET(curvnet); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> curvnet =3D saved_vnet; >>> } >>> VNET_LIST_UNREF(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> now several things leap out here.. >>> (like, declaring variables in mid block) >>> using different macros to try do this cleanly might lead to: >>>=20 >>>=20 >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>> VNET_DECL(vnet_iter); >>> VNET_DECL(saved_vnet); >>>=20 >>> IFNET_RLOCK(); >>> CURVNET_SAVE(saved_vnet); >>> VNET_LIST_REF(); >>> FOREACH_VNET(vnet_iter) { >>>=20 >>> CURVNET_SET_QUIET(vnet_iter); >>> INIT_VNET_NET(vnet_iter); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> } >>> CURVNET_SET(vnet_hold); >>> VNET_LIST_UNREF(); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> this adds a lot to the original.. >>>=20 >>> I could see: >>>=20 >>> using bigger macros, getting it back (size wise) to: >>>=20 >>> static void >>> if_slowtimo(void *arg) >>> { >>> struct ifnet *ifp; >>> VNET_ITERATOR_DECL(vnet_iter, saved_vnet); >>>=20 >>> IFNET_RLOCK(); >>> FOREACH_VNET(vnet_iter, saved_vnet) { >>> VNET_SWITCHTO(vnet_iter); >>> TAILQ_FOREACH(ifp, &V_ifnet, if_link) { >>> if (ifp->if_timer =3D=3D 0 || --ifp->if_timer) >>> continue; >>> if (ifp->if_watchdog) >>> (*ifp->if_watchdog)(ifp); >>> } >>> } >>> FOREACH_VNET_COMPLETE(saved_vnet); >>> IFNET_RUNLOCK(); >>> timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ); >>> } >>>=20 >>> still bigger than the original macros though arguably more "C-like" >>>=20 >>> anyone have better ways to express this? >>>=20 >>> Brook, robert, bz? does this look better? >>=20 >> I don't think we need an explicit CURVNET_SAVE() in most of the places= =20 >> that iterate over the entire vnet list, because in functions where=20 >> iteration takes place there's typically no vnet context set on entry. >>=20 >> So perhaps a replacement for current VNET_ITERLOOP_BEGIN /=20 >> VNET_ITERLOOP_END kludge looking like this could suffice: >>=20 >> VNET_LIST_REF(); /* essentialy a RLOCK() */ >> VNET_FOREACH(vnet_iter) { >> CURVNET_SET(vnet_iter); >> /* existing code chunk body, 1-tab indent prepended */ >> CURVNET_RESTORE(); >> } >> VNET_LIST_UNREF(); /* essentially a RUNLOCK() */ >=20 > also. it it enough to just have a reference? is there a (rw)lock for > the vimage list? This really needs to be changed to the appropriate real lock (sx, rw, or rm) rather than a hand rolled version. Unless another syncronization mechanism does not provide what we need, we should always error on the side of using the existing primative. -- Brooks >>=20 >> This could provide more insight into what's going on in the loop, while= =20 >> still allowing for all the macros to vanish in nooptions VIMAGE builds. >>=20 >> Marko >> _______________________________________________ >> freebsd-virtualization@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization >> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fre= ebsd.org" >=20 > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free= bsd.org" --s9fJI615cBHmzTOP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFIxTbsXY6L6fI4GtQRAlJVAJ0SmIc+gJW7AAWwDPpynVUrVumgowCfZAMD RHslUHcfiCUH7kkTzz/uD8M= =DPo3 -----END PGP SIGNATURE----- --s9fJI615cBHmzTOP-- From owner-freebsd-virtualization@FreeBSD.ORG Wed Sep 10 08:10:01 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8315E1065675 for ; Wed, 10 Sep 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 66BAA8FC15 for ; Wed, 10 Sep 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 5BBCC2496; Wed, 10 Sep 2008 01:10:01 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 2C01A2D600E; Wed, 10 Sep 2008 01:10:00 -0700 (PDT) Message-ID: <48C780E4.2050207@elischer.org> Date: Wed, 10 Sep 2008 01:10:12 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec References: <200809081655.m88GtxbV000906@repoman.freebsd.org> In-Reply-To: <200809081655.m88GtxbV000906@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization mailing list Subject: Vnet iteration X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 08:10:01 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=149433 > > Change 149433 by zec@zec_tpx32 on 2008/09/08 16:55:34 > > First-cut replacement of VNET_ITERLOOP_BEGIN() / > VNET_ITERLOOP_END() kludges with VNET_FOREACH() constructs > discussed at freebsd-virtualization@ > > Needs a bit more testing before merging over to > vimage-commit2 branch. > > Affected files ... > > .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#3 edit > .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#66 edit > .. //depot/projects/vimage/src/sys/net/if.c#36 edit > .. //depot/projects/vimage/src/sys/net/if_ef.c#6 edit > .. //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#8 edit > .. //depot/projects/vimage/src/sys/netgraph/atm/ng_atm.c#6 edit > .. //depot/projects/vimage/src/sys/netgraph/ng_gif.c#7 edit > .. //depot/projects/vimage/src/sys/netinet/igmp.c#15 edit > .. //depot/projects/vimage/src/sys/netinet/in_pcb.c#29 edit > .. //depot/projects/vimage/src/sys/netinet/in_rmx.c#18 edit > .. //depot/projects/vimage/src/sys/netinet/ip_input.c#32 edit > .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#47 edit > .. //depot/projects/vimage/src/sys/netinet/tcp_timer.c#20 edit > .. //depot/projects/vimage/src/sys/netinet6/frag6.c#17 edit > .. //depot/projects/vimage/src/sys/netipsec/key.c#20 edit > .. //depot/projects/vimage/src/sys/sys/vimage.h#63 edit > > Differences ... [...] > + VNET_FOREACH(vnet_iter) { > + CURVNET_SET(vnet_iter); /* XXX CURVNET_SET_QUIET() ? */ > + INIT_VNET_NET(vnet_iter); > + TAILQ_FOREACH(ifp, &V_ifnet, if_link) > + (void)ifaddr_event_handler(NULL, ifp); > + CURVNET_RESTORE(); > } this looks great.. I'd like to see as much of this as possible in commit2 and then I'd like to see it committed as soon as brokk, bz and others have kicked the t[yi]res a bit. :-) From owner-freebsd-virtualization@FreeBSD.ORG Wed Sep 10 20:03:27 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92D891065671 for ; Wed, 10 Sep 2008 20:03:27 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 7997B8FC1A for ; Wed, 10 Sep 2008 20:03:27 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id B50E323EE; Wed, 10 Sep 2008 13:03:28 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id C76062D60BA; Wed, 10 Sep 2008 13:03:26 -0700 (PDT) Message-ID: <48C8281A.3080505@elischer.org> Date: Wed, 10 Sep 2008 13:03:38 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: FreeBSD virtualization mailing list , Marko Zec Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: latest vimage kernel has some problems.. X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 20:03:27 -0000 Marko, I think some locking changes recently may have frightenned the vimage system.. ;-) sorry about the wrapping.. my Mail program seems to not like this sort of thing.. root@trafmon2:root(26) vimage -i fred bge1 bge1 panic: mutex ifnet not owned at ../../../net/if.c:206 cpuid = 0 KDB: enter: panic [thread pid 1328 tid 100128 ] Stopped at kdb_enter+0x3a: movl $0,kdb_why db> bt Tracing pid 1328 tid 100128 td 0xc699c690 kdb_enter(c0b2456d,c0b2456d,c0b23034,f0c59ac8,0,...) at kdb_enter+0x3a panic(c0b23034,c0b32f47,c0b32abf,ce,f0c59afc,...) at panic+0x12c _mtx_assert(c0dc8a64,4,c0b32abf,ce,f0c59b24,...) at _mtx_assert+0x87 ifnet_setbyindex(2,0,c60aa500,c60aa500,27,...) at ifnet_setbyindex+0xa2 if_reassign_common(c62b4800,c6a70000,c0b331d4,0,c0b32abf,...) at if_reassign_common+0x92 ether_reassign(c62b4800,c6a70000,c6ae7828,1,c6a70000,...) at ether_reassign+0x5c vi_if_move(c6ae7000,0,c607e000,c0b1ff2f,c6054948,...) at vi_if_move+0x1c1 ifioctl(c68924a4,cc3c6967,c6ae7000,c699c690,c0784fda,...) at ifioctl+0xfb soo_ioctl(c65c05e8,cc3c6967,c6ae7000,c65b1a00,c699c690,...) at soo_ioctl+0x467 kern_ioctl(c699c690,3,cc3c6967,c6ae7000,1b565af,...) at kern_ioctl+0x1dd ioctl(c699c690,f0c59cf8,c,f0c59d38,c0bf8450,...) at ioctl+0x134 syscall(f0c59d38) at syscall+0x2a3 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x2816cae3, esp = 0xbfbfdfec, ebp = 0xbfbfec88 --- db> From owner-freebsd-virtualization@FreeBSD.ORG Wed Sep 10 20:10:25 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0899B10656AD for ; Wed, 10 Sep 2008 20:10:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outc.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id ACD7C8FC19 for ; Wed, 10 Sep 2008 20:10:24 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 97DCC24C0; Wed, 10 Sep 2008 13:10:24 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id D420E2D602E; Wed, 10 Sep 2008 13:10:23 -0700 (PDT) Message-ID: <48C829BC.3060809@elischer.org> Date: Wed, 10 Sep 2008 13:10:36 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: FreeBSD virtualization mailing list , Marko Zec References: <48C8281A.3080505@elischer.org> In-Reply-To: <48C8281A.3080505@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: latest vimage kernel has some problems.. X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 20:10:25 -0000 Julian Elischer wrote: > Marko, > > I think some locking changes recently may have frightenned the vimage > system.. ;-) oops I see you jsut fixed this.. (recompiling....) > > > sorry about the wrapping.. my Mail program seems to not like > this sort of thing.. > > root@trafmon2:root(26) vimage -i fred bge1 bge1 > panic: mutex ifnet not owned at ../../../net/if.c:206 > cpuid = 0 > KDB: enter: panic > [thread pid 1328 tid 100128 ] > Stopped at kdb_enter+0x3a: movl $0,kdb_why > db> bt > Tracing pid 1328 tid 100128 td 0xc699c690 > kdb_enter(c0b2456d,c0b2456d,c0b23034,f0c59ac8,0,...) at kdb_enter+0x3a > panic(c0b23034,c0b32f47,c0b32abf,ce,f0c59afc,...) at panic+0x12c > _mtx_assert(c0dc8a64,4,c0b32abf,ce,f0c59b24,...) at _mtx_assert+0x87 > ifnet_setbyindex(2,0,c60aa500,c60aa500,27,...) at ifnet_setbyindex+0xa2 > if_reassign_common(c62b4800,c6a70000,c0b331d4,0,c0b32abf,...) at > if_reassign_common+0x92 > ether_reassign(c62b4800,c6a70000,c6ae7828,1,c6a70000,...) at > ether_reassign+0x5c > vi_if_move(c6ae7000,0,c607e000,c0b1ff2f,c6054948,...) at vi_if_move+0x1c1 > ifioctl(c68924a4,cc3c6967,c6ae7000,c699c690,c0784fda,...) at ifioctl+0xfb > soo_ioctl(c65c05e8,cc3c6967,c6ae7000,c65b1a00,c699c690,...) at > soo_ioctl+0x467 > kern_ioctl(c699c690,3,cc3c6967,c6ae7000,1b565af,...) at kern_ioctl+0x1dd > ioctl(c699c690,f0c59cf8,c,f0c59d38,c0bf8450,...) at ioctl+0x134 > syscall(f0c59d38) at syscall+0x2a3 > Xint0x80_syscall() at Xint0x80_syscall+0x20 > --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x2816cae3, esp = > 0xbfbfdfec, ebp = 0xbfbfec88 --- > db> > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to > "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Thu Sep 11 17:42:58 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2FD106567F for ; Thu, 11 Sep 2008 17:42:58 +0000 (UTC) (envelope-from mehulc87@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by mx1.freebsd.org (Postfix) with ESMTP id 971148FC08 for ; Thu, 11 Sep 2008 17:42:58 +0000 (UTC) (envelope-from mehulc87@gmail.com) Received: by wx-out-0506.google.com with SMTP id s17so219133wxc.7 for ; Thu, 11 Sep 2008 10:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=vGecM7oZDqLStldpXz8HAn6YVk3/pSQTH4m25vbhw1o=; b=jrTzG7ic91da4ikpdVWzHWHNaB7BR+u/niv6PdXFs8a4gBJw8AQzs60iDMdARGUI0L LYc75V9ldX7zOhbFphxKLV9Sds4yQPhtq691SmYRV/wjlWy88l9wvbIfua0oRYjx4kt0 U2LrbricPJGiMSFrmaAaAdrV0+tiAckwZKYKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=DORQwjDefX0GneBUnCPjZyBshIBa0iEGXBQbekwmVgJJNFqy41PQhaURYuAoUCXnCD rYMWY6qP66HmWYk4R+TXAf44bEXkTJUSrR+eIE8SmFoYs7u4WtSB64iEUbp9SN0zoiEv 8DYRUGo6dS+Md9HaukK5Ui+vfh5ZSzVCEyioM= Received: by 10.65.219.20 with SMTP id w20mr4737182qbq.43.1221153702029; Thu, 11 Sep 2008 10:21:42 -0700 (PDT) Received: by 10.65.35.4 with HTTP; Thu, 11 Sep 2008 10:21:41 -0700 (PDT) Message-ID: <251d650c0809111021w6f3e3586pb81918ec1f10eb8b@mail.gmail.com> Date: Thu, 11 Sep 2008 22:51:41 +0530 From: "Mehul Chadha" To: freebsd-virtualization@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Adding Virtual kernel support to FreeBSD X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2008 17:42:58 -0000 hello all, We are a group of 3 students doing their graduation in computer science. We were thinking of implementing the virtual kernel support to freeBSD similar to what user mode linux does . We would be very thankful if we can have some suggestions and advice from your side. Thanks and Regards, Mehul From owner-freebsd-virtualization@FreeBSD.ORG Fri Sep 12 04:03:33 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A985106566C; Fri, 12 Sep 2008 04:03:33 +0000 (UTC) (envelope-from steve@energistic.com) Received: from energistic.com (mail.energistic.com [216.54.148.60]) by mx1.freebsd.org (Postfix) with ESMTP id D5A868FC1B; Fri, 12 Sep 2008 04:03:32 +0000 (UTC) (envelope-from steve@energistic.com) Received: from energistic.com (localhost [127.0.0.1]) by energistic.com (8.14.3/8.14.2) with ESMTP id m8C3Y1T6086633; Thu, 11 Sep 2008 23:34:01 -0400 (EDT) (envelope-from steve@energistic.com) Received: (from steve@localhost) by energistic.com (8.14.3/8.14.2/Submit) id m8C3Y1bK086529; Thu, 11 Sep 2008 23:34:01 -0400 (EDT) (envelope-from steve) Date: Thu, 11 Sep 2008 23:34:01 -0400 From: Steve Ames To: Kip Macy Message-ID: <20080912033401.GA61061@energistic.com> References: <3c1674c90808222138v12d7b9f8q5230273b076b3b43@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c1674c90808222138v12d7b9f8q5230273b076b3b43@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Status: No, score=-9.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, TW_BF,TW_XB,USER_IN_WHITELIST_TO autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on energistic.com Cc: freebsd-virtualization@freebsd.org Subject: Re: xen update X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 04:03:33 -0000 Hello, just now getting a chance to test. I am likely doing something wrong :) I did the following: 1. Installed a fresh FreeBSD 8-CURRENT system using the latest snapshot ISO 2. Updated code and did makeworld && make installworld 3. Built a kernel using the stock XEN kernel config file 4. On blank partition I created an image in the following manner: dd if=/dev/zero of=xen.img bs=1024k count=5132 mdconfig -a -t vnode -f xen.img -u 3 bsdlabel -w md3 bsdlabel -e md3 (where I created 2 partitions: / on a and swap on b) newfs /dev/md3a mount /dev/md3a /mnt (copied all data from theFreebsd8 partition to /dev/md3a using backup | restor) 5. Modified /mnt/etc/fstab and /mnt/etc/ttys 6. Copied /mnt/boo/kernel/kernel and my newly created xen.img files to a CentOS 5 server which has Xen 3.1 I believe. 7. Created a xen load file: name = "fbsd8" kernel = "/root/kernel.bsd8" vif = [ 'bridge=xenbr1' ] memory = 256 disk = [ 'file://root/xen.img,0x01,w' ] vcpus=1 on_crash = 'preserve' 8. started the image using 'xm create fbsd8 -c' 9. receivd the following break to debugger: Started domain fbsd8 WARNING: loader(8) metadata is missing! GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #0: Wed Sep 10 17:01:33 EDT 2008 root@:/usr/obj/usr/src/sys/XEN WARNING: WITNESS option enabled, expect reduced performance. Xen reported: 3000.102 MHz processor. Timecounter "ixen" frequency 1000000000 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 3.00GHz (3000.10-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf4a Stepping = 10 Features=0xbfebfbff Features2=0x641d AMD Features=0x20000000 AMD Features2=0x1 Logical CPUs per core: 2 real memory = 268435456 (256 MB) avail memory = 255057920 (243 MB) Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0xbffffc00 fault code = supervisor read, page not present instruction pointer = 0x21:0xc02f429d stack pointer = 0x29:0xc0580d28 frame pointer = 0x29:0xc0580d30 code segment = base 0x0, limit 0xf9800, type 0x1b = DPL 1, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 0 () [thread pid 0 tid 0 ] Stopped at MPentry+0x6d: cmpl $0x5f504d5f,kernbase(%eax) db> So... where did I go wrong? Thanks. -Steve From owner-freebsd-virtualization@FreeBSD.ORG Fri Sep 12 06:58:07 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13E201065676 for ; Fri, 12 Sep 2008 06:58:07 +0000 (UTC) (envelope-from numardbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by mx1.freebsd.org (Postfix) with ESMTP id BFC858FC17 for ; Fri, 12 Sep 2008 06:58:06 +0000 (UTC) (envelope-from numardbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so887010rvf.43 for ; Thu, 11 Sep 2008 23:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:face:mime-version :content-type:content-transfer-encoding; bh=bejhFzvCYadvJcWgK+DZb5fuO8PBfIi3QJZJSN1RpZE=; b=JOXYjEx8HtoKO+10exMiz2DzVFyn5tBZ8FtfhlkwbadrZZdimMnFUH7FxWYasjcRws qIPrqKs8KZ+q3rAZFTs/+BKXzUOAD9/yUmtPHVZoCN+nYnIkiT2o8PXVRAyHtvDgRYG7 Z34Z9OluYpPdr+XlFu+WueQTyEd5DX3sWtUPo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :face:mime-version:content-type:content-transfer-encoding; b=InATWqLfFOaN33MbOiFFSfTghJQTDWNkEJF1l/U8FvqTIb1mDrEc6pkXgEJL/Ojyzy G2KEc1/hom0WETIUA4RE92BCqmaTYalkek8LrLm2IVerEoD9yQSbC3NVatYV3rlAzYEP CBebrY0IQ84el05vOTyqMubRPMb2CLgEYETu4= Received: by 10.141.29.8 with SMTP id g8mr2357931rvj.62.1221200896146; Thu, 11 Sep 2008 23:28:16 -0700 (PDT) Received: from ayiin ( [124.170.218.78]) by mx.google.com with ESMTPS id f21sm15832456rvb.5.2008.09.11.23.28.14 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Sep 2008 23:28:15 -0700 (PDT) Date: Fri, 12 Sep 2008 16:28:11 +1000 From: Norberto Meijome To: FreeBSD virtualization mailing list Message-ID: <20080912162811.7b8e212d@ayiin> In-Reply-To: <6.0.0.22.2.20080909054031.025d14a0@mail.computinginnovations.com> References: <6.0.0.22.2.20080908221910.025e3508@mail.computinginnovations.com> <48C5EF82.8000904@gmail.com> <6.0.0.22.2.20080908224405.025edbf0@mail.computinginnovations.com> <6.0.0.22.2.20080909054031.025d14a0@mail.computinginnovations.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Derek Ragona Subject: Re: {Spam?} Re: {Spam?} Re: Virtual machines hosted on FreeBSD 7 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 06:58:07 -0000 On Tue, 09 Sep 2008 05:40:58 -0500 Derek Ragona wrote: NM > > NM > >you can use qemu - it's not as good as vmware or xen, but it may be good NM > >enough. i've used it just fine for using winxp machines on my fbsd laptop. > > Did you just install qemu from the ports? > > -Derek > hi Derek, please keep the list in CC. yes, from ports. also install kqemu port and test whether using it for all qemu kernel calls or only userland makes a difference - i've found it crashing more often when using the full accel mode, but quite ok when using it for some of the syscalls only. kqemu-kmod-1.3.0.p11_9 Kernel Accelerator for QEMU CPU Emulator qemu-0.9.1_9 QEMU CPU Emulator qtemu-1.0.5_1 A Qt4 front-end to Qemu Mind you, i have only used it in a desktop environment... I don't think it is ready for a full enterprise / virtualisation solution like vmware or xen. B _________________________ {Beto|Norberto|Numard} Meijome "The distinction between past, present and future is only an illusion, even if a stubborn one" Albert Einstein I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. From owner-freebsd-virtualization@FreeBSD.ORG Fri Sep 12 16:31:33 2008 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9C4E106566B for ; Fri, 12 Sep 2008 16:31:33 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32705.mail.mud.yahoo.com (web32705.mail.mud.yahoo.com [68.142.207.249]) by mx1.freebsd.org (Postfix) with SMTP id 738778FC19 for ; Fri, 12 Sep 2008 16:31:33 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 92712 invoked by uid 60001); 12 Sep 2008 16:31:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=q+uXVUXk6bp2o8s5e59yjs9ntMisV5Tv7BJZll9gh2dt6kAKx/6qtvH0ecyIbawwFaOpKSNpQ1KSkfm+lqHKVZHOqSr+Bmjg6JNM2LlrUj7QDnj4ErepoDoKNsFASzFA6kEc8t8kS6xAScSzPoB4dduSc7f9YqCMp8LVp3qvWpY=; X-YMail-OSG: TdoJOuoVM1l0einb3XvL8IGmwP7oMTu4tdDHmghYJibaqwHMt6SDdn375mH_uCBw9NUnbnA46uCu3.SpqcvHJqWsAvg.H2W2w80FLLQY8iL2uHYEvB6mmSd3QwNn_UJ3.lrE.PpjYMPezjUPJ6_PXb8- Received: from [190.158.44.173] by web32705.mail.mud.yahoo.com via HTTP; Fri, 12 Sep 2008 09:31:32 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Fri, 12 Sep 2008 09:31:32 -0700 (PDT) From: Pedro Giffuni To: Klaus Espenlaub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <880886.92445.qm@web32705.mail.mud.yahoo.com> X-Mailman-Approved-At: Fri, 12 Sep 2008 17:35:52 +0000 Cc: freebsd-emulation@FreeBSD.org, freebsd-virtualization@FreeBSD.org Subject: Re: VirtualBox looks for FreeBSD developer X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 16:31:33 -0000 Hi Klaus; Thank you for your posting on -ports: http://docs.freebsd.org/cgi/mid.cgi?48C8F051.7060107 I think either -emulation or -virtualization might be better targets for su= ch discussion though (indeed we did discuss it briefly in the virtualizatio= n list).=20 Some of us are very interested in having VirtualBox on FreeBSD, and I under= stand the FreeBSD Foundation would consider sponsoring such effort if someo= ne with the know-how makes the proposal. I don't have what's needed but I was thinking maybe someone that knows well= the kqemu module would have that know-how... Perhaps you could give us mor= e insight on what needs to be done/documented? Pedro. =0A=0A__________________________________________________=0ADo You Yahoo!?= =0APoco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tan= to spazio gratuito per i tuoi file e i messaggi =0Ahttp://mail.yahoo.it From owner-freebsd-virtualization@FreeBSD.ORG Fri Sep 12 17:45:43 2008 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83456106566B for ; Fri, 12 Sep 2008 17:45:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outW.internet-mail-service.net (outw.internet-mail-service.net [216.240.47.246]) by mx1.freebsd.org (Postfix) with ESMTP id 6D2418FC19 for ; Fri, 12 Sep 2008 17:45:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A75EE22FA; Fri, 12 Sep 2008 10:45:43 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 7D8382D6015; Fri, 12 Sep 2008 10:45:42 -0700 (PDT) Message-ID: <48CAAAC5.2050707@elischer.org> Date: Fri, 12 Sep 2008 10:45:41 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: pfgshield-freebsd@yahoo.com References: <880886.92445.qm@web32705.mail.mud.yahoo.com> In-Reply-To: <880886.92445.qm@web32705.mail.mud.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Klaus Espenlaub , freebsd-emulation@FreeBSD.org, freebsd-virtualization@FreeBSD.org Subject: Re: VirtualBox looks for FreeBSD developer X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 17:45:43 -0000 Pedro Giffuni wrote: > Hi Klaus; > > Thank you for your posting on -ports: > > http://docs.freebsd.org/cgi/mid.cgi?48C8F051.7060107 > > I think either -emulation or -virtualization might be better > targets for such discussion though (indeed we did discuss it > briefly in the virtualization list). > > Some of us are very interested in having VirtualBox on FreeBSD, and > I understand the FreeBSD Foundation would consider sponsoring such > effort if someone with the know-how makes the proposal. Klause, freebsd-virtualization@freebsd.org (this mail is there) is the place you want but it is a new list and not everyone on freebsd-emulation@freebsd.org will be on it (yet). Freebsd ports is for ported software, but virtualbox doesn't really come into that category yet.. > > I don't have what's needed but I was thinking maybe someone that > knows well the kqemu module would have that know-how... Perhaps you > could give us more insight on what needs to be done/documented? A laundry list of what is needed would be good.. Remember that we have had vmware running on FreeBSD so it can be done. > > Pedro. > > > __________________________________________________ Do You Yahoo!? > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti > da tanto spazio gratuito per i tuoi file e i messaggi > http://mail.yahoo.it > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To > unsubscribe, send any mail to > "freebsd-virtualization-unsubscribe@freebsd.org"