From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
clameter@sgi.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: 2.6.24-rc2: Network commit causes SLUB performance regression with tbench
Date: Wed, 14 Nov 2007 11:02:11 +1100 [thread overview]
Message-ID: <200711141102.11477.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20071114114844.GA13927@gondor.apana.org.au>
On Wednesday 14 November 2007 22:48, Herbert Xu wrote:
> On Wed, Nov 14, 2007 at 03:10:22AM -0800, David Miller wrote:
> > So the thing that's being effected here in TCP is
> > net/ipv4/tcp.c:select_size(), specifically the else branch:
>
> Thanks for the pointer. Indeed there is a bug in that area.
> I'm not sure whether it's causing the problem at hand but it's
> certainly suboptimal.
>
> [TCP]: Fix size calculation in sk_stream_alloc_pskb
This looks like it fixes the problem!
Still interested to know why SLAB didn't see the same thing...
> We round up the header size in sk_stream_alloc_pskb so that
> TSO packets get zero tail room. Unfortunately this rounding
> up is not coordinated with the select_size() function used by
> TCP to calculate the second parameter of sk_stream_alloc_pskb.
>
> As a result, we may allocate more than a page of data in the
> non-TSO case when exactly one page is desired.
>
> In fact, rounding up the head room is detrimental in the non-TSO
> case because it makes memory that would otherwise be available to
> the payload head room. TSO doesn't need this either, all it wants
> is the guarantee that there is no tail room.
>
> So this patch fixes this by adjusting the skb_reserve call so that
> exactly the requested amount (which all callers have calculated in
> a precise way) is made available as tail room.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> Cheers,
next prev parent reply other threads:[~2007-11-14 0:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200711092336.56172.nickpiggin@yahoo.com.au>
[not found] ` <Pine.LNX.4.64.0711091533300.17621@schroedinger.engr.sgi.com>
[not found] ` <200711101229.35822.nickpiggin@yahoo.com.au>
2007-11-10 3:28 ` 2.6.24-rc2: Network commit causes SLUB performance regression with tbench Nick Piggin
[not found] ` <Pine.LNX.4.64.0711121144001.26936@schroedinger.engr.sgi.com>
2007-11-13 11:41 ` Nick Piggin
2007-11-14 1:58 ` David Miller
2007-11-13 17:36 ` Nick Piggin
2007-11-14 6:12 ` David Miller
2007-11-13 18:14 ` Nick Piggin
2007-11-14 6:37 ` David Miller
2007-11-13 22:27 ` Nick Piggin
2007-11-13 22:55 ` Nick Piggin
2007-11-14 11:10 ` David Miller
2007-11-13 23:39 ` Nick Piggin
2007-11-14 11:48 ` Herbert Xu
2007-11-14 0:02 ` Nick Piggin [this message]
2007-11-14 12:10 ` David Miller
2007-11-14 18:33 ` Christoph Lameter
2007-11-14 23:46 ` David Miller
2007-11-15 0:21 ` Nick Piggin
2007-11-15 0:27 ` David Miller
2007-11-15 1:03 ` Christoph Lameter
2007-11-15 1:11 ` Herbert Xu
2007-11-15 1:47 ` Nick Piggin
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=200711141102.11477.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=clameter@sgi.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).