Date: Tue, 16 Dec 2008 11:36:55 -0800 From: Julian Elischer <julian@elischer.org> To: Bruce Simpson <bms@incunabulum.net> Cc: FreeBSD virtualization mailing list <freebsd-virtualization@freebsd.org>, qingli@FreeBSD.org, zec@freebsd.org, gnn@FreeBSD.org, rwatson@freebsd.org Subject: Re: Problems with IGMPv3 and VIMAGE Message-ID: <49480357.2000400@elischer.org> In-Reply-To: <4947FB30.8090905@incunabulum.net> References: <4947B5DB.7030502@incunabulum.net> <4947EE59.3090502@elischer.org> <4947F1F4.6020306@incunabulum.net> <4947F935.9070301@elischer.org> <4947FB30.8090905@incunabulum.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Simpson wrote: > Julian Elischer wrote: >> virtualisation of netisr at teh moment is still in flux a bit. >> the netisr thread (that's all it really is) becomes associated with >> a particular vimage as required. (but hey... read the code.. :-) >> >> http://perforce.freebsd.org/fileLogView.cgi?FSPC=//depot/projects/vimage/src/sys/net/netisr.c >> >> >> >>> >>> Is there a way of virtualizing mutexes? IGMPv3 currently has a global >>> output queue serviced by the netisr, as that is able to take all the >>> required locks in the right order to get to ip_output(), and this >>> queue is covered by a mutex. >> >> mutexes embedded in structures that are virtualises are virtualised.. >> for example if you have a mutex on teh reassembly queue in one stack >> that owuld b e a differnt mutex than one on another stack so they >> could never collide. >> it's a per instance decision on the part of the porter. > > OK, so I have to move "struct ifqueue igmpoq" into "struct vnet_inet" ? not necessarily. atomicity of virtualization is on kernel module boundaries. By this I mean that if it's separately loadable, it is probably separate enough to have it's own virtualisation structure containing al it's own 'global' variables, including its mutex. When you register your module with the vimage framework a new instance of your structure should be allocated by the constructor method you registered for it. > > Do I have to explicitly mtx_init() this mutex from within my pr_init > routine, i.e. igmp_init() ? > yes, as a new one would be created every time we make a new virtual machine (with its own IGMP3 instance). Don't forget to make a destructor function as well that tears down teh IGMP3 stack when the VM is removed. > Up until now the code has been using the MTX_SYSINIT() macro. I don't THINK that will work but I could be wrong.. Marko has done some pretty remarkable things. > >> >> Have you looked at the Vimage porter guide? >> >> http://perforce.freebsd.org/fileLogView.cgi?FSPC=//depot/projects/vimage/porting_to_vimage.txt >> > > Yes, but it didn't answer all my questions, so I am bugging everyone :-) when you understand something new, please send me an update to the doc that explains it so I can make the doc better. > > thanks again > BMS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49480357.2000400>