netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 8% performance improved by change tap interact with kernel stack
@ 2014-01-28  8:14 Qin Chuanyu
  2014-01-28  8:34 ` Michael S. Tsirkin
  2014-01-28 14:49 ` Eric Dumazet
  0 siblings, 2 replies; 14+ messages in thread
From: Qin Chuanyu @ 2014-01-28  8:14 UTC (permalink / raw)
  To: jasowang, Michael S. Tsirkin, Anthony Liguori, KVM list, netdev

according perf test result,I found that there are 5%-8% cpu cost on 
softirq by use netif_rx_ni called in tun_get_user.

so I changed the function which cause skb transmitted more quickly.
from
	tun_get_user	->
		 netif_rx_ni(skb);
to
	tun_get_user	->
		rcu_read_lock_bh();
		netif_receive_skb(skb);
		rcu_read_unlock_bh();

The test result is as below:
	CPU: Intel(R) Xeon(R) CPU E5620  @ 2.40GHz
	NIC: intel 82599
	Host OS/Guest OS:suse11sp3
	Qemu-1.6
	netperf udp 512(VM tx)
	test model: VM->host->host

	modified before : 2.00Gbps 461146pps
	modified after  : 2.16Gbps 498782pps

8% performance gained from this change,
Is there any problem for this patch ?


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

end of thread, other threads:[~2014-02-11 13:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28  8:14 8% performance improved by change tap interact with kernel stack Qin Chuanyu
2014-01-28  8:34 ` Michael S. Tsirkin
2014-01-28  9:14   ` Qin Chuanyu
2014-01-28  9:41     ` Michael S. Tsirkin
2014-01-28 10:19       ` Qin Chuanyu
2014-01-28 10:33         ` Michael S. Tsirkin
2014-01-28 16:58           ` Stephen Hemminger
2014-01-28 17:18             ` Michael S. Tsirkin
2014-01-29  7:41           ` Qin Chuanyu
2014-01-29  7:56             ` Michael S. Tsirkin
2014-01-28 16:56     ` Rick Jones
2014-01-28 14:49 ` Eric Dumazet
2014-01-29  7:12   ` Qin Chuanyu
2014-02-11 13:21   ` Qin Chuanyu

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