From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafal Wojtczuk Subject: Re: Assigning contiguous memory to a driver domain Date: Wed, 15 Sep 2010 16:44:13 +0200 Message-ID: <20100915144413.GB2098@email> References: <20100915090842.GB1583@email> <20100915093910.GC1583@email> <4C90B31902000078000163E8@vpn.id2.novell.com> <4C90A32A.7010803@invisiblethingslab.com> <4C90C3200200007800016442@vpn.id2.novell.com> <4C90A8E4.9090004@invisiblethingslab.com> <4C90CF39020000780001647E@vpn.id2.novell.com> <87pqwfgqvt.fsf@frosties.localdomain> <20100915120626.GA2024@email> <4C90EB1102000078000164C6@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Return-path: Content-Disposition: inline In-Reply-To: <4C90EB1102000078000164C6@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Dan Magenheimer , xen-devel@lists.xensource.com, Joanna Rutkowska , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Wed, Sep 15, 2010 at 02:49:37PM +0100, Jan Beulich wrote: > >>> On 15.09.10 at 14:06, Rafal Wojtczuk wrote: > > It is not too convincing, either. Firstly, assuming there is no dom0mem > > parameter to Xen, dom0 gets all memory initially, so when dom0 boots the > > first time, Xen free memory = 0 ? And drivers load fine. > > Xen reserves 1/16th of the memory (up to 128Mb) in this case for this > very purpose. Otherwise, Dom0 would neither be able to set up its > swiotlb nor would any coherent/consistent allocations work. I see. > > Secondly, by default on Fedora, the pm-utils scripts tell NetworkManager to > > turn off networking just before entering S3 sleep, and NetworkManager downs > > all > > interfaces. It brings them up on resume. And apparently there are some > > drivers, like tg3, that needs to alloc when bringing up the device. Still, > > suspend/resume works when all devices are assigned to dom0. > > Because on suspend the driver frees the memory which on resume > it will allocate back? I am a bit lost. By "frees the memory" you mean "return contiguous memory to Xen free memory" ? Does it really work this way ? If so, it requires nonzero Xen free memory ? And that is why when I do "ifconfig eth0 down; ifconfig eth0 up" in the driver domain the second one fails ? Regards, Rafal Wojtczuk