WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question regarding SLAB corruption

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Question regarding SLAB corruption
From: Roland Dreier <rdreier@xxxxxxxxx>
Date: Mon, 09 Jul 2007 15:30:26 -0700
Authentication-results: sj-dkim-3; header.From=rdreier@xxxxxxxxx; dkim=pass ( sig from cisco.com/sjdkim3002 verified; );
Cc: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 10 Jul 2007 10:14:19 -0700
Dkim-signature: v=0.5; a=rsa-sha256; q=dns/txt; l=754; t=1184020236; x=1184884236; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@xxxxxxxxx; z=From:=20Roland=20Dreier=20<rdreier@xxxxxxxxx> |Subject:=20Re=3A=20[Xen-devel]=20Question=20regarding=20SLAB=20corruptio n |Sender:=20; bh=VRFiF/t27opokRvHZY61TyqbhTl83YdqYCqN1lQXOo0=; b=dw5lSK2AHexD8fO2Ch98XY8pOdvVTAYghomXsTRnfna7yAV9r2ayUc3YECQfzeqnLh8JO7kx D3ljaTm4sPF8MaJTWA0fB66wQDUSoTdSbjRQvCPIcYGowoZZ7D70OoOD;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2B87584.A93A%keir@xxxxxxxxxxxxx> (Keir Fraser's message of "Mon, 09 Jul 2007 23:30:12 +0100")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C2B87584.A93A%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux)
 > > 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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel