[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2006081403560.71460@chino.kir.corp.google.com>
Date: Mon, 8 Jun 2020 14:04:16 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
cc: Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dma-pool: Fix too large DMA pools on medium systems
On Mon, 8 Jun 2020, Geert Uytterhoeven wrote:
> On systems with at least 32 MiB, but less than 32 GiB of RAM, the DMA
> memory pools are much larger than intended (e.g. 2 MiB instead of 128
> KiB on a 256 MiB system).
>
> Fix this by correcting the calculation of the number of GiBs of RAM in
> the system. Invert the order of the min/max operations, to keep on
> calculating in pages until the last step, which aids readability.
>
> Fixes: 1d659236fb43c4d2 ("dma-pool: scale the default DMA coherent pool size with memory capacity")
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
This works as well and is much more readable. Thanks Geert!
Acked-by: David Rientjes <rientjes@...gle.com>
Powered by blists - more mailing lists