From: Christoph Hellwig <hch@lst.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: iommu@lists.linux-foundation.org, Christoph Hellwig <hch@lst.de>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: large DMA segments vs SWIOTLB
Date: Thu, 1 Aug 2019 16:00:45 +0200 [thread overview]
Message-ID: <20190801140045.GA23435@lst.de> (raw)
In-Reply-To: <1564648502.7267.27.camel@pengutronix.de>
On Thu, Aug 01, 2019 at 10:35:02AM +0200, Lucas Stach wrote:
> Hi Christoph,
>
> Am Donnerstag, den 01.08.2019, 09:29 +0200 schrieb Christoph Hellwig:
> > Hi Lukas,
> >
> > have you tried the latest 5.3-rc kernel, where we limited the NVMe
> > I/O size based on the swiotlb buffer size?
>
> Yes, the issue was reproduced on 5.3-rc2. I now see your commit
> limiting the request size, so I guess I need to dig in to see why I'm
> still getting requests larger than the SWIOTLB max segment size. Thanks
> for the pointer!
a similar setup to yours the
dma_addressing_limited doesn't work, but if we changed it to a <=
it does. The result is counter to what I'd expect, but because I'm on
vacation I didn't have time to look into why it works. This is his
patch, let me know if this works for you:
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index f7d1eea32c78..89ac1cf754cc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -689,7 +689,7 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
*/
static inline bool dma_addressing_limited(struct device *dev)
{
- return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) <
+ return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) <=
dma_get_required_mask(dev);
}
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-08-01 14:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 14:40 large DMA segments vs SWIOTLB Lucas Stach
2019-08-01 7:29 ` Christoph Hellwig
2019-08-01 8:35 ` Lucas Stach
2019-08-01 14:00 ` Christoph Hellwig [this message]
2019-08-05 15:56 ` Lucas Stach
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=20190801140045.GA23435@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=konrad.wilk@oracle.com \
--cc=l.stach@pengutronix.de \
/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