iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes via iommu <iommu@lists.linux-foundation.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	Robin Murphy <robin.murphy@arm.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2] dma-pool: Fix too large DMA pools on medium systems
Date: Mon, 8 Jun 2020 14:04:16 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2006081403560.71460@chino.kir.corp.google.com> (raw)
In-Reply-To: <20200608132217.29945-1-geert@linux-m68k.org>

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@linux-m68k.org>

This works as well and is much more readable.  Thanks Geert!

Acked-by: David Rientjes <rientjes@google.com>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-06-08 21:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 13:22 [PATCH v2] dma-pool: Fix too large DMA pools on medium systems Geert Uytterhoeven
2020-06-08 21:04 ` David Rientjes via iommu [this message]
2020-06-09 13:26 ` Christoph Hellwig
2020-06-20 20:09 ` Guenter Roeck
2020-06-21  8:35   ` Geert Uytterhoeven
2020-06-21 13:11     ` Guenter Roeck
2020-06-21 20:20       ` David Rientjes via iommu
2020-06-22 16:07         ` Robin Murphy
2020-06-22 17:31           ` Christoph Hellwig
2020-06-24  7:38   ` Christoph Hellwig
2020-06-24 16:20     ` Guenter Roeck
2020-06-27 16:13     ` Marion & Christophe JAILLET
2020-06-29  8:12       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2006081403560.71460@chino.kir.corp.google.com \
    --to=iommu@lists.linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).