linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/4]: dma, x86, xen: reduce SWIOTLB usage in Xen guests
@ 2014-11-19 16:01 David Vrabel
  2014-11-19 16:01 ` [PATCH 1/4] dma: add dma_get_required_mask_from_max_pfn() David Vrabel
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Vrabel @ 2014-11-19 16:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Vrabel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	xen-devel, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	Greg Kroah-Hartman

On systems where DMA addresses and physical addresses are not 1:1
(such as Xen PV guests), the generic dma_get_required_mask() will not
return the correct mask (since it uses max_pfn).

Some device drivers (such as mptsas, mpt2sas) use
dma_get_required_mask() to set the device's DMA mask to allow them to use
only 32-bit DMA addresses in hardware structures.  This results in
unnecessary use of the SWIOTLB if DMA addresses are more than 32-bits,
impacting performance significantly.

This series allows Xen PV guests to override the default
dma_get_required_mask() with one that calculates the DMA mask from the
maximum MFN (and not the PFN).

Changes in v3:
- fix off-by-one in xen_dma_get_required_mask()
- split ia64 changes into separate patch.

Changes in v2:
- split x86 and xen changes into separate patches

David

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-20 11:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 16:01 [PATCHv3 0/4]: dma, x86, xen: reduce SWIOTLB usage in Xen guests David Vrabel
2014-11-19 16:01 ` [PATCH 1/4] dma: add dma_get_required_mask_from_max_pfn() David Vrabel
2014-11-19 16:01 ` [PATCH 2/4] ia64: use common dma_get_required_mask_from_pfn() David Vrabel
2014-11-19 17:33   ` Stefano Stabellini
2014-11-19 16:02 ` [PATCH 3/4] x86: allow dma_get_required_mask() to be overridden David Vrabel
2014-11-19 16:02 ` [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask David Vrabel
2014-11-19 17:51   ` [Xen-devel] " Stefano Stabellini
2014-11-20 11:42     ` David Vrabel
2014-11-20 11:21   ` Jan Beulich

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).