From: "Jan Beulich" Subject: RE: Tmem vs order>0 allocation, workaround RFC Date: Tue, 16 Feb 2010 15:45:51 +0000 Message-ID: <4B7ACBBF020000780002FA64@vpn.id2.novell.com> References: <2af13319-6b44-44e2-ab62-a0615208cf64@default> <78c49794-4454-4c3b-80a6-72efcbc73fb3@default><78c49794-4454-4c3b-80a6-72efcbc73fb3@default> <057c0f45-9c97-4b8a-8efa-1726fd951e19@default> <4B7A6363020000780002F93C@vpn.id2.novell.com><4B7A6363020000780002F93C@vpn.id2.novell.com> <4B7AC4AD020000780002FA3D@vpn.id2.novell.com> <816f818b-b45a-4e74-8b01-0409fd50f578@default> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <816f818b-b45a-4e74-8b01-0409fd50f578@default> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: xen-devel@lists.xensource.com, AndrewPeace , George Dunlap , kurt.hackel@oracle.com, Ian Pratt , TimDeegan , Patrick Colp , KeirFraser , Grzegorz Milos List-Id: xen-devel@lists.xenproject.org >>> Dan Magenheimer 16.02.10 16:31 >>> >> From: Jan Beulich [mailto:JBeulich@novell.com]=20 >> Subject: RE: Tmem vs order>0 allocation, workaround RFC >>=20 >> >>> Dan Magenheimer 16.02.10 16:05 >>> >> >Under what circumstances does dom0 require single-page-below-4G >> >allocations? Is it only for bounce buffers for PCI passthrough >> >of old devices with 32-bit addressing limitations? Or am I >>> >missing a much more common case? >>=20 >> Not just for pass-through; all devices only supporting 32-bit >> addressing would have such requirements, and particularly common >> ones are display adapters which have DRM/AGP drivers loaded for >> them. > >Right, but those are statically allocated when dom0 is >launched, not dynamically allocated later after tmem >(or other memory allocation technologies) begin working, >right? Whereas pass-through devices would need below-4G >pages later? No, consistent/coherent allocations can happen at run time. Typically the largest share of the allocations would happen when the respective driver loads, but especially for the DRM/AGP case I think allocations get triggered by user mode (X initializing a display), which may happen at any time. >(And 32-bit devices in a 1TB machine seems a bit of a >stretch, but I suppose it is good to enumerate all the >cases.) Yes, but the 1Tb was just taken as an extreme example. Issues may arise earlier. And the display adapter part would likely remain valid even there - just see the use of vmalloc_32() in drivers/gpu/drm/drm_scatter.c for an example. Jan