WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] TODO in windows balloon driver

HI James:

        I've noticed the TODO tag in xenpci/xenpci_fdo.c, line 294

   290         KdPrint((__DRIVER_NAME "     Calling
HYPERVISOR_memory_op(XENMEM_populate_physmap) - pfn_count = %d\n",
pfn_count));
   291         ret = HYPERVISOR_memory_op(xpdd, XENMEM_populate_physmap,
&reservation);
   292         ExFreePoolWithTag(pfns, XENPCI_POOL_TAG);
   293         KdPrint((__DRIVER_NAME "     populated %d pages\n", ret));
   294         /* TODO: what do we do if less than the required number of
pages were populated??? can this happen??? */


        Could we fix it in linux balloon driver way? 
        When no enough pfn_count got, give memory back to xen.
        What do you think?
        Thanks.

       /* TODO: what do we do if less than the required number of pages were
populated??? can this happen??? */
        /* fixed! */
        if(ret < (ULONG)pfn_count){
            if(ret > 0){
                /* We hit the Xen hard limit: reprobe. */
                reservation.nr_extents = ret;
                ret = HYPERVISOR_memory_op(xpdd,
XENMEM_decrease_reservation, &reservation);
                KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
            }
            mdl->Next = head;
            head = mdl;
            ExFreePoolWithTag(pfns, XENPCI_POOL_TAG);
            break;
        }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>