From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: Question regarding SLAB corruption Date: Mon, 09 Jul 2007 15:30:26 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Keir Fraser's message of "Mon, 09 Jul 2007 23:30:12 +0100") 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 Cc: Lukas Hejtmanek , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > > And is there any more intelligent way to give big chunks of system > > memory to a PCI device for exclusive use? > > Perhaps dma_alloc_coherent/pci_alloc_consistent? These always return > machine-contiguous memory. I'm not sure if their use in this way would be an > abuse of the DMA API, though. It's not an abuse but it uses kernel address space unnecessarily on 32-bit (non-Xen) architectures. If I'm just giving a chunk of memory to the device, I might as well allocate pages with GFP_HIGHUSER and save scarce kernel address space. As a Xen-specific change it might make sense to convert some of the allocations from alloc_pages to dma_alloc_coherent but I'm not likely to make the change in the mainline driver. - R.