Thread (21 messages) 21 messages, 7 authors, 2014-02-25

Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe

From: Dan Williams <hidden>
Date: 2014-02-12 14:56:40
Also in: lkml

On Tue, Feb 11, 2014 at 8:17 PM, Eric Dumazet [off-list ref] wrote:
On Tue, 2014-02-11 at 18:07 -0800, Dan Williams wrote:
quoted
The overlap granularity is too large.  Multiple dma_map_single
mappings are allowed to a given page as long as they don't collide on
the same cache line.
I am not sure why you try number of mappings of a page.
For this debug facility I am tracking whether dma has completed by
making sure there are no active dma_map entries in the address range
of a page being cow'd.
Try launching 100 concurrent netperf -t TCP_SENFILE

Same page might be mapped more than 100 times, more than 10000 times in
some cases.
Aren't these mapping serialized by the device to some extent?
Although multi-queue / multi-device would even defeat that...

Hmm, then I think at a minimum the activity tracking needs to be
constrained to overlapping DMA_FROM_DEVICE or DMA_BIDIRECTIONAL
mappings.  However, I am still operating on the assumption that some
architectures (especially non-io-coherent or dmabounce architectures)
expect a dma mapping to reflect exclusive ownership of the buffer.
From the conversation I had with Russell, back in the day [1]:
"When we get to the second async_xor(), as we haven't started to run any
of these operations, the source and destination buffers are still mapped.
However, we ignore that and call dma_map_page() on them again - this is
illegal because the CPU does not own these buffers."

It might be the case that we can't have a general overlap detection
facility as it will flag stable use cases that nonetheless violate the
exclusivity expectation.

--
Dan

[1]: http://marc.info/?l=linux-arm-kernel&m=129389649101566&w=2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help