linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Petr Tesařík" <petr@tesarici.cz>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>,
	Christoph Hellwig <hch@lst.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Petr Tesarik <petr.tesarik1@huawei-partners.com>,
	Ross Lagerwall <ross.lagerwall@citrix.com>,
	linux-pci <linux-pci@vger.kernel.org>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>
Subject: Re: Memory corruption with CONFIG_SWIOTLB_DYNAMIC=y
Date: Mon, 6 Nov 2023 08:44:48 +0100	[thread overview]
Message-ID: <20231106074448.GB17777@lst.de> (raw)
In-Reply-To: <20231103195949.0af884d0@meshulam.tesarici.cz>

On Fri, Nov 03, 2023 at 07:59:49PM +0100, Petr Tesařík wrote:
> I don't think it's possible to improve the allocation logic without
> modifying the page allocator and/or the DMA atomic pool allocator to
> take additional constraints into account.
> 
> I had a wild idea back in March, but it would require some intrusive
> changes in the mm subsystem. Among other things, it would make memory
> zones obsolete. I mean, people may actually like to get rid of DMA,
> DMA32 and NORMAL, but you see how many nasty bugs were introduced even
> by a relatively small change in SWIOTLB. Replacing memory zones with a
> system based on generic physical allocation constraints would probably
> blow up the universe. ;-)

It would be very nice, at least for DMA32 or the 30/31-bit DMA pools
used on some architectures.  For the x86-style 16MB zone DMA I suspect
just having a small pool on the side that's not even exposed to the
memory allocator would probably work better.

I think a lot of the MM folks would love to be able to kill of the
extra zones.

  reply	other threads:[~2023-11-06  7:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 15:13 Memory corruption with CONFIG_SWIOTLB_DYNAMIC=y Niklas Schnelle
2023-11-03 16:14 ` Halil Pasic
2023-11-03 20:50   ` Petr Tesařík
2023-11-06  7:42     ` Christoph Hellwig
2023-11-07 17:24       ` Halil Pasic
2023-11-08  7:30         ` Christoph Hellwig
2023-11-06 10:08     ` Halil Pasic
2023-11-07 17:24     ` Halil Pasic
2023-11-08  9:13       ` Petr Tesařík
2023-11-23 10:16         ` Petr Tesařík
2023-11-27 15:59           ` Christoph Hellwig
2023-11-28  7:16             ` Petr Tesařík
2023-11-03 18:59 ` Petr Tesařík
2023-11-06  7:44   ` Christoph Hellwig [this message]
2023-11-06 12:46     ` Petr Tesarik
2023-11-08 10:52   ` Halil Pasic
2023-11-08 11:04     ` Petr Tesarik
2023-11-08 14:32       ` Halil Pasic
2023-11-08 14:45         ` Petr Tesarik
2023-11-10  9:22           ` Halil Pasic

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=20231106074448.GB17777@lst.de \
    --to=hch@lst.de \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=petr.tesarik1@huawei-partners.com \
    --cc=petr@tesarici.cz \
    --cc=robin.murphy@arm.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=schnelle@linux.ibm.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).