Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 31 Dec 2002 12:15:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 31 Dec 2002 12:15:07 -0500 Received: from host194.steeleye.com ([66.206.164.34]:11792 "EHLO pogo.mtv1.steeleye.com") by vger.kernel.org with ESMTP id ; Tue, 31 Dec 2002 12:15:06 -0500 Message-Id: <200212311723.gBVHNS502319@localhost.localdomain> X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 To: David Brownell cc: James Bottomley , linux-kernel@vger.kernel.org Subject: Re: [PATCH] generic device DMA (dma_pool update) In-Reply-To: Message from David Brownell of "Tue, 31 Dec 2002 09:04:44 PST." <3E11CE2C.3000308@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 31 Dec 2002 11:23:28 -0600 From: James Bottomley X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 27 david-b@pacbell.net said: > The same is true of the slab code, which is a better allocator. Why > should kernels require an extra allocator, when pci_pool can safely be > eliminated on quite a few systems? I agree in principle. But the way to get this to work is to allow the slab allocater to specify its getpages and freepages in the same way as ctor and dtor, so it can be fed by dma_alloc_coherent. Then you can wrapper the slab allocator to be used across all platforms (rather than only those which are coherent and have no IOMMU). The benefit mempool has over slab is its guaranteed minimum pool size and hence guaranteed non-failing allocations as long as you manage pool resizing correctly. I suppose this is primarily useful for storage devices, which sometimes need memory that cannot be obtained from doing I/O. However, you can base mempool off slab modified to use dma_alloc_coherent() and get the benefits of everything. James - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/