From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: netdev@vger.kernel.org
Cc: Christoph Lameter <cl@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>, David Miller <davem@davemloft.net>,
Lennert Buytenhek <buytenh@marvell.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Patch for tbench regression.
Date: Mon, 29 Sep 2008 01:15:30 +0400 [thread overview]
Message-ID: <20080928211530.GA9341@2ka.mipt.ru> (raw)
Hi.
Attached patch fixes (at least partially) tbench regressions reported
recently. I ran it on 4-way machine and noticed more than 20%
performance degradation comapred to 2.6.22 kernel. Unfortunately all my
remote machine are now stuck in death at various (apparently unbootable)
bisections, so I switched to the Xen domain, which only has 256 mb of
RAM and is generally very slow.
Because of that I was not able to run 2.6.22 tree (compilation and git
operations take really long time on this 'machine' and it is middle of
the night in Moscow), but I tested it on 2.6.27-rc7 and was able reach
performance higher than 2.6.26. According to my tests there were no
noticeble regressions in 2.6.24-2.6.26, so this patch should at least
fix 2.6.26->2.6.27 one.
Idea is rather trivial: disable TSO and GSO on loopback. The latter was
actually enabled by bisected e5a4a72d4f8 commit, which enables GSO
unconditionally if device supports scatter/gather and checksumming.
Apparently GSO packet construction has bigger overhead and smaller
packet processing. I did not bisect TSO in loopback patch, but concluded
it from above (actually its gain is even bigger than GSO on SG
device).
I will try to bring my tast machines back tomorrow and run it there,
but patch does fix the same regression tested in small Xen domain.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 3b43bfd..a22ae35 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -169,7 +169,6 @@ static void loopback_setup(struct net_device *dev)
dev->type = ARPHRD_LOOPBACK; /* 0x0001*/
dev->flags = IFF_LOOPBACK;
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST
- | NETIF_F_TSO
| NETIF_F_NO_CSUM
| NETIF_F_HIGHDMA
| NETIF_F_LLTX
diff --git a/net/core/dev.c b/net/core/dev.c
index e8eb2b4..dddb5c2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4003,10 +4003,6 @@ int register_netdevice(struct net_device *dev)
}
}
- /* Enable software GSO if SG is supported. */
- if (dev->features & NETIF_F_SG)
- dev->features |= NETIF_F_GSO;
-
netdev_initialize_kobject(dev);
ret = netdev_register_kobject(dev);
if (ret)
--
Evgeniy Polyakov
next reply other threads:[~2008-09-28 21:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-28 21:15 Evgeniy Polyakov [this message]
2008-09-29 3:12 ` Patch for tbench regression Herbert Xu
2008-09-29 5:36 ` Evgeniy Polyakov
2008-09-29 5:40 ` Herbert Xu
2008-09-29 5:52 ` Evgeniy Polyakov
2008-09-29 6:40 ` Herbert Xu
2008-09-29 6:45 ` Evgeniy Polyakov
2008-09-29 7:02 ` Herbert Xu
2008-09-29 7:11 ` Evgeniy Polyakov
2008-09-29 7:20 ` Herbert Xu
2008-09-29 9:43 ` Herbert Xu
2008-09-29 9:51 ` Herbert Xu
2008-09-29 17:07 ` Rick Jones
2008-09-29 10:34 ` Evgeniy Polyakov
2008-09-29 13:34 ` Christoph Lameter
2008-09-29 17:01 ` Rick Jones
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=20080928211530.GA9341@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=buytenh@marvell.com \
--cc=cl@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=mel@csn.ul.ie \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.