From: Eric Dumazet <eric.dumazet@gmail.com>
To: starlight@binnacle.cx
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
linux-kernel@vger.kernel.org, Mel Gorman <mel@csn.ul.ie>,
linux-mm@kvack.org, hugh.dickins@tiscali.co.uk,
Lee.Schermerhorn@hp.com, kosaki.motohiro@jp.fujitsu.com,
ebmunson@us.ibm.com, agl@us.ibm.com, apw@canonical.com,
wli@movementarian.org, Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: QUESTION: can netdev_alloc_skb() errors be reduced by tuning?
Date: Tue, 16 Jun 2009 08:12:30 +0200 [thread overview]
Message-ID: <4A3737CE.3020305@gmail.com> (raw)
In-Reply-To: <6.2.5.6.2.20090616000017.05b5da70@binnacle.cx>
Please dont top post, we prefer other way around :)
starlight@binnacle.cx a ecrit :
> 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>
next prev parent reply other threads:[~2009-06-16 6:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 11:12 [PATCH 0/2] Fixes for hugetlbfs-related problems on shared memory Mel Gorman
2009-05-27 11:12 ` [PATCH 1/2] x86: Ignore VM_LOCKED when determining if hugetlb-backed page tables can be shared or not Mel Gorman
2009-05-27 16:38 ` Eric B Munson
2009-05-27 23:18 ` Ingo Molnar
2009-05-28 8:55 ` Mel Gorman
2009-05-27 11:12 ` [PATCH 2/2] mm: Account for MAP_SHARED mappings using VM_MAYSHARE and not VM_SHARED in hugetlbfs Mel Gorman
2009-05-27 16:40 ` Eric B Munson
2009-05-27 20:14 ` [PATCH 0/2] Fixes for hugetlbfs-related problems on shared memory Andrew Morton
2009-05-27 23:19 ` Ingo Molnar
2009-06-16 0:19 ` QUESTION: can netdev_alloc_skb() errors be reduced by tuning? starlight
2009-06-16 2:26 ` Eric Dumazet
2009-06-16 4:12 ` starlight
2009-06-16 6:12 ` Eric Dumazet [this message]
2009-07-05 3:44 ` Herbert Xu
2009-06-16 9:19 ` Mel Gorman
2009-06-16 15:25 ` starlight
2009-05-28 8:56 ` [PATCH 0/2] Fixes for hugetlbfs-related problems on shared memory Mel Gorman
2009-06-08 1:25 ` starlight
2009-06-08 10:24 ` Mel Gorman
2009-06-16 17:24 QUESTION: can netdev_alloc_skb() errors be reduced by tuning? starlight
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=4A3737CE.3020305@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=Lee.Schermerhorn@hp.com \
--cc=agl@us.ibm.com \
--cc=apw@canonical.com \
--cc=ebmunson@us.ibm.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=netdev@vger.kernel.org \
--cc=starlight@binnacle.cx \
--cc=wli@movementarian.org \
/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