From: "Jan Beulich" Subject: Re: linux: GFP_DMA/GFP_DMA32 Date: Wed, 04 Apr 2007 08:33:24 +0100 Message-ID: <461370E4.76E4.0078.0@novell.com> References: <4612822B.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Keir Fraser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 04.04.07 09:11 >>> >How many callers rely on GFP_DMA32? We gave up on GFP_DMA because no halfway >modern hardware relies on it and we can't currently satisfy requests for >memory below 16MB anyway. For GFP_DMA, I stopped counting when I found the third or fourth one - the grep indicated another dozen or so candidates. For GFP_DMA32, it's just two (all agp drivers, which I said I have a fix for, and drivers/media/video/video-buf.c - there are many suspicious virt_to_phys() uses underneath drivers/media/, so this subtree looks broken in general). In may cases GFP_DMA is just being used to restrict memory to somewhere below 32-bits, not necessarily to 24. >As for solutions, either we have to hook the memory allocator somehow to get >a call out to allocate memory of the correct type, or callers do indeed need >fixing one by one. I thought about possible hooks, too, but after a page was allocated you don't know what GFP_* it was allocated with. The only not too intrusive way I could immediately think of would be to further leverage PG_foreign here, but I'm afraid its use of page->index may then get into conflict with other uses... Jan