netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch for tbench regression.
@ 2008-09-28 21:15 Evgeniy Polyakov
  2008-09-29  3:12 ` Herbert Xu
  0 siblings, 1 reply; 16+ messages in thread
From: Evgeniy Polyakov @ 2008-09-28 21:15 UTC (permalink / raw)
  To: netdev
  Cc: Christoph Lameter, Mel Gorman, David Miller, Lennert Buytenhek,
	Herbert Xu

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

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

end of thread, other threads:[~2008-09-29 17:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 21:15 Patch for tbench regression Evgeniy Polyakov
2008-09-29  3:12 ` 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

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