netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: QUESTION: can netdev_alloc_skb() errors be reduced  by  tuning?
       [not found]         ` <6.2.5.6.2.20090616000017.05b5da70@binnacle.cx>
@ 2009-06-16  6:12           ` Eric Dumazet
  2009-07-05  3:44             ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2009-06-16  6:12 UTC (permalink / raw)
  To: starlight
  Cc: Eric Dumazet, linux-kernel, Mel Gorman, linux-mm, hugh.dickins,
	Lee.Schermerhorn, kosaki.motohiro, ebmunson, agl, apw, wli,
	Linux Netdev List

Please dont top post, we prefer other way around :)

starlight@binnacle.cx a écrit :
> Eric,
> 
> Great thought--thank you.  Running a similar server with 
> 82571/e1000e and it does not exhibit the problem.  'e1000e' has 
> default copybreak=256 while 'ixgbe' has no copybreak.  Rational 
> given is
> 
>    http://osdir.com/ml/linux.drivers.e1000.devel/2008-01/msg00103.html
> 
> But the comparion is a bit apples-and-oranges since the 'e1000e' 
> system is dual Opteron 2354 while the 'ixgbe' system is Xeon 
> E5430 (a painful choice thus far).  Also 'e1000e' system passes 
> data via a PACKET socket while the 'ixgbe' system passes data 
> via UDP (a configurable option).
> 
> I'm not fully up on how this all works: am I to understand that 
> the error could result from RX ring-queue buffers not freeing 
> quickly enough because they have a use-count held non-zero as
> the packet travels the stack?

Well, error is normal in stress situation, when no more kernel
memory is available.

cat /proc/net/udp

can show you (in last column) sockets where packets where dropped
by UDP stack if their receive queue was full.

> 
> I've just doubled some SLAB tuneables that seem relevant, but 
> if the cause is the aforementioned, this won't help.  Will
> have the answer on the tweaks by the end of Tuesday.
> 
> David

copybreak in drivers themselves is nice because driver can recycle
its rx skbs much faster, but that is suboptimal in forwarding (routers)
workloads. Its also a lot of duplicated code in every driver.

So we could do the skb trimming (ie : reallocating the data portion to exactly
the size of packet) in core network stack, when we know packet must be handled
by an application, and not dropped or forwarded by kernel.

Because of slab rounding, this reallocation should be done only if resulting data
portion is really smaller (50 %) than original skb.

> 
> 
> 
> At 04:26 AM 6/16/2009 +0200, Eric Dumazet wrote:
>> 152691992335/724246449 = 210 bytes per rx packet in average
>>
>> It could make sense to add copybreak feature in this driver to 
>> reduce memory needs, but that also would consume more cpu 
>> cycles, and slow down forwarding setups.
>>
>> Maybe this packet trimming could be done generically in UDP 
>> stack input path, before queueing packet into a receive queue, 
>> if amount of available memory is under a given threshold.
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: QUESTION: can netdev_alloc_skb() errors be reduced  by  tuning?
  2009-06-16  6:12           ` QUESTION: can netdev_alloc_skb() errors be reduced by tuning? Eric Dumazet
@ 2009-07-05  3:44             ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2009-07-05  3:44 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: starlight, eric.dumazet, linux-kernel, mel, linux-mm,
	hugh.dickins, Lee.Schermerhorn, kosaki.motohiro, ebmunson, agl,
	apw, wli, netdev

Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> Because of slab rounding, this reallocation should be done only if resulting data
> portion is really smaller (50 %) than original skb.

If we're going to do this in the core then we should only do it
in the spots where the packet may be held indefinitely.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-05  3:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1243422749-6256-1-git-send-email-mel@csn.ul.ie>
     [not found] ` <20090527131437.5870e342.akpm@linux-foundation.org>
     [not found]   ` <20090527231949.GB30002@elte.hu>
     [not found]     ` <6.2.5.6.2.20090615201713.05b5d408@binnacle.cx>
     [not found]       ` <4A3702CF.9070303@gmail.com>
     [not found]         ` <6.2.5.6.2.20090616000017.05b5da70@binnacle.cx>
2009-06-16  6:12           ` QUESTION: can netdev_alloc_skb() errors be reduced by tuning? Eric Dumazet
2009-07-05  3:44             ` Herbert Xu

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).