From mboxrd@z Thu Jan 1 00:00:00 1970 From: ANNIE LI Subject: Re: Error restoring DomU when using GPLPV Date: Wed, 16 Sep 2009 12:37:32 +0800 Message-ID: <4AB06B8C.6010403@oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Joshua West , Dan Magenheimer , xen-devel , "Kurt C. Hackel" , James Harper , "wayne.gong@oracle.com" List-Id: xen-devel@lists.xenproject.org Hi, > Actually of course you do the right thing with the shinfo page, so actually > one page per migration does get switched back to being a Xenheap page (the > shinfo page) and tot_pages actually increases by 3 on the first migration, > then decreases by 1 when shinfo gets remapped by the PV drivers. Then > increases by 1 on every future migration (which is the shinfo Xenheap page > getting changed into a domheap page), and then decreases by 1 when shinfo > gets remapped by the PV drivers. > > But even setting things out exactly right as above, the end result is the > same: I *still* cannot explain Annie's result. The root cause is that winpv driver did not re-map gnttab frames during resuming. Thanks Mukesh very much. My initial implementation was to map all 32 grant table pages during initialization, and then balloon down those pages during driver first load. However, i leaked those 32 grant pages if i did not re-map those pages during resuming. This is why Save/restore can work only once. My second implementation is to map corresponding grant frames device needs instead of all 32 grant table. But it will leak 2 frames every migration because of missing re-mapping grant tables. Then i tried to re-map the grant table during resuming, and balloon down shinfo+gntab driver first load. I did save/restore several times, did not hit any problem. Furthermore, i also tried to map 64 grant table pages during initialization and ballooned down those pages, all work fine. I will do more test to make sure it and update here. Thanks Annie.