Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-10 Thread Nicolas Saenz Julienne
On Thu, 2020-07-09 at 14:49 -0700, David Rientjes wrote: > On Wed, 8 Jul 2020, Christoph Hellwig wrote: > > > On Wed, Jul 08, 2020 at 06:00:35PM +0200, Nicolas Saenz Julienne wrote: > > > On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > > > > On Tue, Jul 07, 2020 at 02:28:04PM +0200,

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-09 Thread David Rientjes via iommu
On Wed, 8 Jul 2020, Christoph Hellwig wrote: > On Wed, Jul 08, 2020 at 06:00:35PM +0200, Nicolas Saenz Julienne wrote: > > On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > > > On Tue, Jul 07, 2020 at 02:28:04PM +0200, Nicolas Saenz Julienne wrote: > > > > When allocating atomic DMA me

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Jeremy Linton
Hi, On 7/7/20 7:28 AM, Nicolas Saenz Julienne wrote: When allocating atomic DMA memory for a device, the dma-pool core queries __dma_direct_optimal_gfp_mask() to check which atomic pool to use. It turns out the GFP flag returned is only an optimistic guess. The pool selected might sometimes live

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Robin Murphy
On 2020-07-08 16:36, Christoph Hellwig wrote: On Wed, Jul 08, 2020 at 12:35:34PM +0200, Nicolas Saenz Julienne wrote: Which allows me to switch between ACPI/DT on the machine. In DT mode it works fine now, Nice, would that count as a Tested-by from you? but with ACPI I continue to have failu

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2020 at 06:00:35PM +0200, Nicolas Saenz Julienne wrote: > On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > > On Tue, Jul 07, 2020 at 02:28:04PM +0200, Nicolas Saenz Julienne wrote: > > > When allocating atomic DMA memory for a device, the dma-pool core > > > queries __d

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Nicolas Saenz Julienne
On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > On Tue, Jul 07, 2020 at 02:28:04PM +0200, Nicolas Saenz Julienne wrote: > > When allocating atomic DMA memory for a device, the dma-pool core > > queries __dma_direct_optimal_gfp_mask() to check which atomic pool to > > use. It turns out

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2020 at 12:35:34PM +0200, Nicolas Saenz Julienne wrote: > > Which allows me to switch between ACPI/DT on the machine. In DT mode it > > works fine now, > > Nice, would that count as a Tested-by from you? > > > but with ACPI I continue to have failures unless I > > disable CMA v

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Christoph Hellwig
On Tue, Jul 07, 2020 at 02:28:04PM +0200, Nicolas Saenz Julienne wrote: > When allocating atomic DMA memory for a device, the dma-pool core > queries __dma_direct_optimal_gfp_mask() to check which atomic pool to > use. It turns out the GFP flag returned is only an optimistic guess. > The pool selec

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Jeremy Linton
Hi, On 7/8/20 5:35 AM, Nicolas Saenz Julienne wrote: Hi Jim, On Tue, 2020-07-07 at 17:08 -0500, Jeremy Linton wrote: Hi, I spun this up on my 8G model using the PFTF firmware from: https://github.com/pftf/RPi4/releases Which allows me to switch between ACPI/DT on the machine. In DT mode it

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Nicolas Saenz Julienne
Hi Jim, On Tue, 2020-07-07 at 17:08 -0500, Jeremy Linton wrote: > Hi, > > I spun this up on my 8G model using the PFTF firmware from: > > https://github.com/pftf/RPi4/releases > > Which allows me to switch between ACPI/DT on the machine. In DT mode it > works fine now, Nice, would that count

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Jeremy Linton
Hi, I spun this up on my 8G model using the PFTF firmware from: https://github.com/pftf/RPi4/releases Which allows me to switch between ACPI/DT on the machine. In DT mode it works fine now, but with ACPI I continue to have failures unless I disable CMA via cma=0 on the kernel command line. It

[PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-07 Thread Nicolas Saenz Julienne
When allocating atomic DMA memory for a device, the dma-pool core queries __dma_direct_optimal_gfp_mask() to check which atomic pool to use. It turns out the GFP flag returned is only an optimistic guess. The pool selected might sometimes live in a zone higher than the device's view of memory. As