xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: hongkaixing@huawei.com
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] xenpaging:add a new array to speed up page-in in xenpaging
Date: Thu, 5 Jan 2012 21:59:10 +0100	[thread overview]
Message-ID: <20120105205910.GA29311@aepfle.de> (raw)
In-Reply-To: <052727b8165ce6e05002.1325732917@h00166998.china.huawei.com>

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

  parent reply	other threads:[~2012-01-05 20:59 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 [this message]
2012-01-06  2:35   ` Hongkaixing
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=20120105205910.GA29311@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=hongkaixing@huawei.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 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).