ia64/xen-unstable

changeset 19410:3dcb5ad8be0c

fs-back: unmapp all shared ring pages when a domain dies

This bug causes some pages not to be properly freed by xen, hence
after a cycle of 50 save\restore we don't have enough spare memory to
start 2 VMs any more. This patch fixes the issue properly unmapping
all the pages needed by the shared ring.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 20 08:43:53 2009 +0000 (2009-03-20)
parents 2b61a1ee35ee
children c657fc593306
files tools/fs-back/fs-backend.c
line diff
     1.1 --- a/tools/fs-back/fs-backend.c	Fri Mar 20 08:42:59 2009 +0000
     1.2 +++ b/tools/fs-back/fs-backend.c	Fri Mar 20 08:43:53 2009 +0000
     1.3 @@ -161,7 +161,7 @@ static void terminate_mount_request(stru
     1.4      while (!xenbus_frontend_state_changed(mount, STATE_CLOSING));
     1.5      xenbus_write_backend_state(mount, STATE_CLOSED);
     1.6  
     1.7 -    xc_gnttab_munmap(mount->gnth, mount->ring.sring, 1);
     1.8 +    xc_gnttab_munmap(mount->gnth, mount->ring.sring, mount->shared_ring_size);
     1.9      xc_gnttab_close(mount->gnth);
    1.10      xc_evtchn_unbind(mount->evth, mount->local_evtchn);
    1.11      xc_evtchn_close(mount->evth);