[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xenpaging:add a new array to speed up page-in in xenpaging
> -----邮件原件----- > 发件人: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx] > 发送时间: 2012年1月6日 2:27 > 收件人: hongkaixing@xxxxxxxxxx > 抄送: Olaf Hering; xen-devel@xxxxxxxxxxxxxxxxxxx > 主题: Re: [Xen-devel] [PATCH] xenpaging:add a new array to speed up page-in > in xenpaging > > hongkaixing@xxxxxxxxxx writes ("[Xen-devel] [PATCH] xenpaging:add a new > array to speed up page-in in xenpaging"): > > 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. > > Thanks for this submission. Olaf may well have some comments, but I > have some too: > > > @@ -660,6 +672,7 @@ > > break; > > if ( i % 100 == 0 ) > > DPRINTF("%d pages evicted\n", i); > > + page_out_index[victims[i].gfn].index=i; > > Surely this should be better done much closer to the actual point > where we page out ? After we improve the page-in speed, search index in the for loop becomes the bottleneck, extremely when the page number is big. > > And you should reset the index entry when the page is read back in, I > think ? En, our idea is let it go lazy way. I will try my best to make it perfect. > > Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |