xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Hongkaixing <hongkaixing@huawei.com>
To: 'Olaf Hering' <olaf@aepfle.de>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] xenpaging:add a new array to speed up page-in in xenpaging
Date: Fri, 06 Jan 2012 10:35:12 +0800	[thread overview]
Message-ID: <001401cccc1b$e43b5a20$acb20e60$@com> (raw)
In-Reply-To: <20120105205910.GA29311@aepfle.de>

Oh, sorry, this patch is sent in hurry, the whole version is sent out follow this one. 

According to our analysis, the old page in method spends much time in xc_map_foreign_pages, so we introduce a direct way to trigger page in.  This is the point.
After our new page-in method is applied, a new array can speed up page in significantly.

Result shows the page-in speed can reach the hard disk's limit, above 120M/s



> -----邮件原件-----
> 发件人: Olaf Hering [mailto:olaf@aepfle.de]
> 发送时间: 2012年1月6日 4:59
> 收件人: hongkaixing@huawei.com
> 抄送: xen-devel@lists.xensource.com
> 主题: Re: [PATCH] xenpaging:add a new array to speed up page-in in xenpaging
> 
> On Thu, Jan 05, hongkaixing@huawei.com wrote:
> 
> > # HG changeset patch
> > # User hongkaixing<hongkaixing@huawei.com>
> > # Date 1325149704 -28800
> > # Node ID 052727b8165ce6e05002184ae894096214c8b537
> > # Parent  54a5e994a241a506900ee0e197bb42e5f1d8e759
> > xenpaging:add a new array to speed up page-in in xenpaging
> >
> > This patch adds a new array named page_out_index to reserve the victim's
> index.
> > When page in a page,it has to go through a for loop from 0 to num_pages to
> find
> > the right page to read,and it costs much time in this loop.After adding the
> > page_out_index array,it just reads the arrry to get the right page,and saves
> much time.
> >
> > The following is a xenpaging test on suse11-64 with 4G memories.
> >
> > Nums of page_out pages	Page out time	Page in time(in unstable code)
> Page in time(apply this patch)
> > 512M(131072)		    2.6s		           540s
> 530s
> > 2G(524288)		    15.5s		           2088s
> 2055s
> 
> Thanks for your work on this.
> 
> Is the page-out time for 512M really that fast? For me page-out is still
> really slow even when the pagefile is in tmpfs. It takes several
> minutes, I get around 4MB/s. page-in is around 20MB/s.
> 
> Wether an extra array is needed, we have to decide as it costs some
> runtime memory. I was thinking already about better bitop functions,
> like xc_find_next_bit_set and similar, just what xenpaging needs, to
> remove the test bits one-by-one.
> 
> As for the new page-in op, there was some offline discussion about doing
> page-in/page-out differently. If these ideas make into xen-unstable most
> of domctls will disappear, and also the mmap to trigger page-in is not
> needed anymore.
> 
> Olaf


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2012-01-06  2:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05  3:08 [PATCH] xenpaging:add a new array to speed up page-in in xenpaging hongkaixing
2012-01-05 18:27 ` Ian Jackson
2012-01-06  2:35   ` Hongkaixing
2012-01-05 18:31 ` Ian Jackson
2012-01-06  2:35   ` Hongkaixing
2012-01-10 17:39     ` Olaf Hering
2012-01-11  7:15       ` Hongkaixing
2012-01-12 14:20         ` Olaf Hering
2012-01-09 11:50   ` Olaf Hering
2012-01-05 20:59 ` Olaf Hering
2012-01-06  2:35   ` Hongkaixing [this message]
2012-01-06 13:07   ` Olaf Hering
2012-01-07  8:55     ` Hongkaixing
2012-01-09 13:13       ` Olaf Hering

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='001401cccc1b$e43b5a20$acb20e60$@com' \
    --to=hongkaixing@huawei.com \
    --cc=olaf@aepfle.de \
    --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 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).