From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hongkaixing Subject: Re: [PATCH] xenpaging:add a new array to speed up page-in in xenpaging Date: Wed, 11 Jan 2012 15:15:43 +0800 Message-ID: <000901ccd030$d6f01e50$84d05af0$@com> References: <052727b8165ce6e05002.1325732917@h00166998.china.huawei.com> <20229.60517.106414.825193@mariner.uk.xensource.com> <001301cccc1b$d7ca1470$875e3d50$@com> <20120110173956.GA2213@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <20120110173956.GA2213@aepfle.de> Content-language: zh-cn List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: 'Olaf Hering' Cc: "'bicky.'" , xiaowei.yang@huawei.com, xen-devel@lists.xensource.com, 'Ian Jackson' , yanqiangjun@huawei.com List-Id: xen-devel@lists.xenproject.org Sorry, this mail is sent out in hurry. In fact we send out 2 patches , and this is only one patch. The second patch is the key. The second patch is about adding a fast way to trigger page-in. Titile is [PATCH 2 of 2] xenpaging:change page-in process to speed up page-in in xenpaging. http://lists.xen.org/archives/html/xen-devel/2012-01/msg00210.html In this patch, we get the return value from p2m_mem_paging_populate(). Because we want to known whether this p2mt is changed by balloon or others. After this patch is published, we have received much advice, so a more perfect patch will be sent out later > -----Original Message----- > From: Olaf Hering [mailto:olaf@aepfle.de] > Sent: Wednesday, January 11, 2012 1:40 AM > To: Hongkaixing > Cc: 'Ian Jackson'; xen-devel@lists.xensource.com; 'bicky.' > Subject: Re: [Xen-devel] [PATCH] xenpaging:add a new array to speed up page-in in xenpaging > > On Fri, Jan 06, Hongkaixing wrote: > > > > Why wrap this up in a struct ? > > > > We want to keep the same style with > > > > typedef struct xenpaging_victim { > > /* the gfn of the page to evict */ > > unsigned long gfn; > > } xenpaging_victim_t; > > This dates back to the initial implementation of xenpaging. > > In my testing I started a guest paused, paged it all out, and paged all > back into memory. By monitoring nr_pages I noticed that page-in got > slightly slower over time, so your suggestion to use two indexes will > speed things up a bit. > > > Looking through xenpaging.c, I think its best to have two flat arrays: > unsigned long slot_to_gfn[paging->max_pages]; /* was victims */ > int gfn_to_slot[paging->max_pages]; > > I will prepare a patch to implement this. > > Olaf