[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4hrVBLghSWB=vRoe_iAcWzRL5ZiN6SXrLmCbHx++hixBA@mail.gmail.com>
Date: Wed, 12 Feb 2014 06:56:36 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Sander Eikelenboom <linux@...elenboom.it>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Wei Liu <wei.liu2@...rix.com>,
Francois Romieu <romieu@...zoreil.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dave Jones <davej@...hat.com>,
Russell King - ARM Linux <linux@....linux.org.uk>
Subject: Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7
overlapping mappings of pfn 55ebe
On Tue, Feb 11, 2014 at 8:17 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2014-02-11 at 18:07 -0800, Dan Williams wrote:
>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists