Re: [PATCH v6 00/17] mm, dma, arm64: Reduce ARCH_KMALLOC_MINALIGN to 8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 12, 2023 at 09:47:55AM +0200, Christoph Hellwig wrote:
> On Mon, Jun 12, 2023 at 07:44:46AM +0000, Tomonori Fujita wrote:
> > I cannot recall the patch but from quick look, moving trace_swiotlb_bounced() to
> > swiotlb_tbl_map_single() makes sense.
> 
> Agreed.

There's actually two call-sites for trace_swiotlb_bounced():
swiotlb_map() and xen_swiotlb_map_page(). Both those functions
also invoke swiotlb_tbl_map_single(), so moving the call to
trace_swiotlb_bounced() to swiotlb_tbl_map_single() means that
there will be 2 traces per bounce buffering event.

The difference between the two call-sites of trace_swiotlb_bounced()
is that the call in swiotlb_map() uses phys_to_dma() for the device
address, while xen_swiotlb_map_page() uses xen_phys_to_dma().

Would it make sense to move the trace_swiotlb_bounced() call to
swiotlb_tbl_map_single() and then introduce a
swiotlb_tbl_map_single_notrace() function which doesn't do the tracing,
and xen_swiotlb_map_page() can call this?

--Isaac




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux