[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53886ABC.8030303@mentor.com>
Date: Fri, 30 May 2014 12:25:48 +0100
From: Jim Baxter <jim_baxter@...tor.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Bjørn Mork <bjorn@...k.no>,
David Laight <David.Laight@...LAB.COM>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH v1 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped.
On 29/05/14 20:04, Eric Dumazet wrote:
> On Thu, 2014-05-29 at 18:12 +0100, Jim Baxter wrote:
>> This fixes a problem with dropped packets over 16k CDC-NCM
>> when the connection is being heavily used.
>>
>> The issue was that the skb truesize for the unpacked NCM
>> packets was too high after they were cloned from the 16k
>> skb, this lead to the potential memory calculated by the
>> Kernel running out of memory earlier then it should.
>>
>> Signed-off-by: Jim Baxter <jim_baxter@...tor.com>
>> ---
>
> Note the patch is OK, but changelog a bit misleading ;)
>
> Kernel was not running out of memory, because truesize was correct.
>
> The problem here is that a frame was consuming more kernel memory than
> really needed, so chances of hitting socket sk_rcvbuf limit was high.
>
> BTW :
> #define NTB_OUT_SIZE 16384
>
> alloc_skb(size) ->
> kmalloc(16384 + sizeof(struct skb_shared_info)) ->
> roundup() => 32768
>
> So truesize of the skb was infact ~32KB, which is really insane indeed.
> After your patch, its back to ~2KB
>
> Acked-by: Eric Dumazet <edumazet@...gle.com>
>
>
>
Thank you, I will clarify the description.
Jim
--
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