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

From: Ben Hutchings
Date: Wed Feb 12 2014 - 17:53:16 EST


On Tue, 2014-02-11 at 13:28 -0800, Eric Dumazet wrote:
[...]
> Incoming frames might be taken out of order-3 pages.
>
> With regular Ethernet frames, this is 21 frames per order-3 pages.
>
> ACTIVE_PFN_MAX_OVERLAP seems too small.
>
> Alternative would be to user order-0 only pages if CONFIG_DMA_API_DEBUG
> is set. Not sure if it works if PAGE_SIZE=66536 ....

Indeed, you can get a lot of packet buffers into a 64K page...

> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index f589c9af8cbf..1b9995adfd29 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -1924,7 +1924,11 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
> kfree_skb(skb);
> }
>
> +#if defined(CONFIG_DMA_API_DEBUG)
> +#define NETDEV_FRAG_PAGE_MAX_ORDER 0
> +#else
> #define NETDEV_FRAG_PAGE_MAX_ORDER get_order(32768)
> +#endif
> #define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER)
> #define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE
>

That may be useful for debugging this particular problem, but please
don't make debugging options change behaviour like this.

Ben.

--
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.

Attachment: signature.asc
Description: This is a digitally signed message part