All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: Steven Smith <Steven.Smith@eu.citrix.com>,
	Ian Pratt <Ian.Pratt@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [Pv-ops][PATCH] Netback multiple tasklet support
Date: Thu, 03 Dec 2009 13:28:39 -0800	[thread overview]
Message-ID: <4B182D87.6030901@goop.org> (raw)
In-Reply-To: <EADF0A36011179459010BDF5142A457501D11C1BE3@pdsmsx502.ccr.corp.intel.com>

On 12/02/09 02:17, Xu, Dongxiao wrote:
> Hi,
> 	According to your feedback, I revised my patch and resend it now.
> 	
> [PATCH 01]: Use multiple tasklet pairs to replace the current single pair in dom0.
> [PATCH 02]: Replace the tasklet with kernel thread. It may hurt the performance, but could improve the responseness from userspace.
>
> Test senario:
> We use ten 1G NIC interface to talk with 10 VMs (netfront) in server. So the total bandwidth is 10G.
> For host machine, bind each guest's netfront with each NIC interface.
> For client machine, do netperf testing with each guest.
>
> Test Case			Throughput(Mbps)	Dom0 CPU Util	Guests CPU Util
> w/o any patch			4304.30		400.33%		112.21%
> w/   01   patch			9533.13		461.64%		243.81%
> w/ 01 and 02 patches		7942.68		597.83%		250.53%
>
>  From the result we can see that, the case "w/ 01 and 02 patches" didn't reach/near the total bandwidth. It is because some vcpus in dom0 are saturated due to the context switch with other tasks, thus hurt the performance. To prove this idea, I did a experiment, which sets the kernel thread to SCHED_FIFO type, in order to avoid preemption by normal tasks. The experiment result is showed below, and it could get good performance. However like tasklet, set the kernel thread to high priority could also influence the userspace responseness because the usespace application (for example, sshd) could not preempt that netback kernel thread.
>
> w/ hi-priority kthread		9535.74		543.56%		241.26%
>
> For netchannel2, it omits the grant copy in dom0, I didn't try it yet. But I used xenoprofile in current netback system to get a feeling that, grant copy occupies  ~1/6 cpu cycle of dom0 (including Xen and dom0 vmlinux).
>
> BTW, 02 patch is ported from the patch given by Ian Campbell. You can add your signed-off-by if you want. :)
>    

I've applied this to the xen/dom0/backend/netback-tasklet branch for 
now.  However, I noticed a number of problems with a quick lookover of 
the code:

    * "netbk" should either be static, or have a longer name (mentioning
      xen)
    * same with "foreign_page_tracker"
          o (the foreign page tracker API should have better names, but
            that's not your problem)
    * What's cpu_online_nr for?  I don't think it should be necessary at
      all, and if it is, then it needs a much more distinct name.
    * If they're really per-cpu variables, they should use the percpu
      mechanism
    * How do you relate the number of online CPUs to the whole group
      index/pending index computation?  It isn't obvious how they're
      connected, or how it guarantees that the index is enough.
    * What happens if you start hotplugging cpus?
    * All the repeated netbk[group_idx]. expressions would be improved
      by defining a local pointer for that value.

     J

  reply	other threads:[~2009-12-03 21:28 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27  2:26 [Pv-ops][PATCH] Netback multiple tasklet support Xu, Dongxiao
2009-11-27  9:42 ` Ian Campbell
2009-11-27 16:08   ` Xu, Dongxiao
2009-11-27 16:15 ` Ian Pratt
2009-11-27 16:57   ` Xu, Dongxiao
2009-11-28 13:15     ` Ian Pratt
2009-12-02 10:17       ` Xu, Dongxiao
2009-12-03 21:28         ` Jeremy Fitzhardinge [this message]
2009-12-04  2:13           ` Xu, Dongxiao
2009-12-04  2:33             ` Jeremy Fitzhardinge
2009-12-08  9:22               ` Xu, Dongxiao
2009-12-09 20:23                 ` Jeremy Fitzhardinge
2009-12-10  3:29                   ` Xu, Dongxiao
2009-12-10 18:01                     ` Jeremy Fitzhardinge
2009-12-11  1:34                       ` Xu, Dongxiao
2010-04-26 14:27                       ` [Pv-ops][PATCH 0/3] Resend: Netback multiple thread support Xu, Dongxiao
2010-04-27  0:19                         ` Konrad Rzeszutek Wilk
2010-04-27  0:40                           ` Xu, Dongxiao
2010-04-27  3:02                         ` Xu, Dongxiao
2010-04-27 10:49                         ` Steven Smith
2010-04-27 18:37                           ` Jeremy Fitzhardinge
2010-04-28  9:31                             ` Steven Smith
2010-04-28 11:36                               ` Xu, Dongxiao
2010-04-28 12:04                                 ` Steven Smith
2010-04-28 13:33                                   ` Xu, Dongxiao
2010-04-30  7:35                                     ` Steven Smith
2010-04-28 10:27                           ` Xu, Dongxiao
2010-04-28 11:51                             ` Steven Smith
2010-04-28 12:23                               ` Xu, Dongxiao
2010-04-28 12:43                               ` Jan Beulich
2010-04-30  7:29                                 ` Steven Smith
2010-04-30  8:27                                   ` Jan Beulich
2009-12-10  9:07                   ` [Pv-ops][PATCH] Netback multiple tasklet support Ian Campbell
2009-12-10 17:54                     ` Jeremy Fitzhardinge
2009-12-10 18:07                       ` Ian Campbell
2009-12-11  8:34                         ` Jan Beulich
2009-12-11  9:34                           ` Ian Campbell
2009-12-11 14:24                             ` Konrad Rzeszutek Wilk
2010-03-17  8:46                       ` [PATCH] [pv-ops] fix dom0 S3 when MSI is used Cui, Dexuan
2010-03-17 14:28                         ` Konrad Rzeszutek Wilk
2010-03-18  3:05                           ` Cui, Dexuan
2010-03-19  1:04                           ` Jeremy Fitzhardinge
2010-03-19  1:03                         ` Jeremy Fitzhardinge
2010-03-19  1:29                           ` Cui, Dexuan
2010-01-13 10:17                     ` [Pv-ops][PATCH] Netback multiple tasklet support Jan Beulich
2010-01-14 16:55                       ` Ian Campbell

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=4B182D87.6030901@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=Steven.Smith@eu.citrix.com \
    --cc=dongxiao.xu@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /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.