From: Sander Eikelenboom <linux@eikelenboom.it>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Wei Liu <wei.liu2@citrix.com>,
Francois Romieu <romieu@fr.zoreil.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe
Date: Thu, 13 Feb 2014 22:49:22 +0100 [thread overview]
Message-ID: <343228200.20140213224922@eikelenboom.it> (raw)
In-Reply-To: <1392322487.11022.4.camel@dwillia2-mobl2.amr.corp.intel.com>
Thursday, February 13, 2014, 9:14:47 PM, you wrote:
> On Tue, 2014-02-11 at 20:17 -0800, Eric Dumazet 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.
>>
>> Try launching 100 concurrent netperf -t TCP_SENFILE
>>
>> Same page might be mapped more than 100 times, more than 10000 times in
>> some cases.
> Thanks for that test case.
> I updated the fix patch with the following.
> diff --git a/lib/dma-debug.c b/lib/dma-debug.c
> index 42b12740940b..611010df1e9c 100644
> --- a/lib/dma-debug.c
> +++ b/lib/dma-debug.c
> @@ -513,6 +513,13 @@ static int active_cln_insert(struct dma_debug_entry *entry)
> unsigned long flags;
> int rc;
>
> + /* If the device is not writing memory then we don't have any
> + * concerns about the cpu consuming stale data. This mitigates
> + * legitimate usages of overlapping mappings.
> + */
+ if (entry->>direction == DMA_TO_DEVICE)
> + return 0;
> +
> spin_lock_irqsave(&radix_lock, flags);
> rc = radix_tree_insert(&dma_active_cacheline, to_cln(entry), entry);
> if (rc == -EEXIST)
> @@ -526,6 +533,10 @@ static void active_cln_remove(struct dma_debug_entry *entry)
> {
> unsigned long flags;
>
> + /* ...mirror the insert case */
+ if (entry->>direction == DMA_TO_DEVICE)
> + return;
> +
> spin_lock_irqsave(&radix_lock, flags);
> /* since we are counting overlaps the final put of the
> * cacheline will occur when the overlap count is 0.
> Sander, barring a negative test result from you I'll send the attached
> patch to Andrew.
Hi Dan,
That seems to effectively suppress the warning, thanks and:
Tested-by; Sander Eikelenboom <linux@eikelenboom.it>
--
Sander
> --
> Dan
next prev parent reply other threads:[~2014-02-13 21:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 10:55 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe Sander Eikelenboom
2014-01-27 0:03 ` Francois Romieu
2014-01-29 3:06 ` Dan Williams
2014-02-06 11:36 ` Sander Eikelenboom
2014-02-06 13:09 ` Sander Eikelenboom
2014-02-06 14:26 ` Dan Williams
2014-02-06 14:27 ` Sander Eikelenboom
2014-02-06 19:12 ` Dan Williams
2014-02-07 10:21 ` Sander Eikelenboom
2014-02-11 19:56 ` Sander Eikelenboom
2014-02-11 21:28 ` Eric Dumazet
2014-02-11 22:53 ` Sander Eikelenboom
2014-02-12 22:52 ` Ben Hutchings
2014-02-12 2:07 ` Dan Williams
2014-02-12 4:17 ` Eric Dumazet
2014-02-12 14:56 ` Dan Williams
2014-02-13 20:14 ` Dan Williams
2014-02-13 21:49 ` Sander Eikelenboom [this message]
2014-02-25 17:45 ` Josh Boyer
2014-02-25 17:50 ` Dan Williams
2014-02-13 20:16 ` Dave Jones
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=343228200.20140213224922@eikelenboom.it \
--to=linux@eikelenboom.it \
--cc=dan.j.williams@intel.com \
--cc=davej@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=romieu@fr.zoreil.com \
--cc=wei.liu2@citrix.com \
/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;
as well as URLs for NNTP newsgroup(s).