public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nickpiggin@yahoo.com.au
Cc: clameter@sgi.com, netdev@vger.kernel.org,
	herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org
Subject: Re: 2.6.24-rc2: Network commit causes SLUB performance regression with tbench
Date: Wed, 14 Nov 2007 03:10:22 -0800 (PST)	[thread overview]
Message-ID: <20071114.031022.183117678.davem@davemloft.net> (raw)
In-Reply-To: <200711140927.39796.nickpiggin@yahoo.com.au>

From: Nick Piggin <nickpiggin@yahoo.com.au>
Date: Wed, 14 Nov 2007 09:27:39 +1100

> OK, in vanilla kernels, the page allocator definitely shows higher
> in the results (than with Herbert's patch reverted).
 ...
> I can't see that these numbers show much useful, unfortunately.

Thanks for all of this data Nick.

So the thing that's being effected here in TCP is
net/ipv4/tcp.c:select_size(), specifically the else branch:

	int tmp = tp->mss_cache;
 ...
		else {
			int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER);

			if (tmp >= pgbreak &&
			    tmp <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE)
				tmp = pgbreak;
		}

This is deciding, in 'tmp', how much linear sk_buff space to
allocate.  'tmp' is initially set to the path MSS, which
for loopback is 16K - the space necessary for packet headers.

The SKB_MAX_HEAD() value has changed as a result of Herbert's
bug fix.   I suspect this 'if' test is passing both with and
without the patch.

But pgbreak is now smaller, and thus the skb->data linear
data area size we choose to use is smaller as well.

You can test if this is precisely what is causing the performance
regression by using the old calculation just here in select_size().

Add something like this local to net/ipv4/tcp.c:

#define OLD_SKB_WITH_OVERHEAD(X)	\
	(((X) - sizeof(struct skb_shared_info)) & \
	 ~(SMP_CACHE_BYTES - 1))
#define OLD_SKB_MAX_ORDER(X, ORDER) \
	OLD_SKB_WITH_OVERHEAD((PAGE_SIZE << (ORDER)) - (X))
#define OLD_SKB_MAX_HEAD(X)		(OLD_SKB_MAX_ORDER((X), 0))

And then use OLD_SKB_MAX_HEAD() in select_size().

  parent reply	other threads:[~2007-11-14 11:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 12:36 2.6.24-rc2 slab vs slob tbench numbers Nick Piggin
2007-11-09 15:15 ` Christoph Lameter
2007-11-09 17:49   ` Christoph Lameter
2007-11-09 23:46     ` 2.6.24-rc2: Network commit causes SLUB performance regression with tbench Christoph Lameter
2007-11-10  1:29       ` Nick Piggin
2007-11-10  3:28         ` Nick Piggin
2007-11-12 19:44         ` Christoph Lameter
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 [this message]
2007-11-13 23:39                           ` Nick Piggin
2007-11-14 11:48                           ` Herbert Xu
2007-11-14  0:02                             ` Nick Piggin
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
2007-11-12 20:13 ` 2.6.24-rc2 slab vs slob tbench numbers Matt Mackall
2007-11-13 11:44   ` 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=20071114.031022.183117678.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=clameter@sgi.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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