win-pvdrivers

changeset 863:ff48ceac3934

Minor changes to ballooning
author James Harper <james.harper@bendigoit.com.au>
date Sun Feb 27 21:20:26 2011 +1100 (2011-02-27)
parents b18d89506753
children 1ed6cb0de408
files xenpci/xenpci.c xenpci/xenpci_fdo.c
line diff
     1.1 --- a/xenpci/xenpci.c	Sun Feb 27 16:19:40 2011 +1100
     1.2 +++ b/xenpci/xenpci.c	Sun Feb 27 21:20:26 2011 +1100
     1.3 @@ -622,6 +622,7 @@ XenPci_InitialBalloonDown()
     1.4      {
     1.5        /* this should actually never happen. If we can't allocate the memory it means windows is using it, and if it was using it we would have crashed already... */
     1.6        KdPrint((__DRIVER_NAME "     Initial Balloon Down failed\n"));
     1.7 +      KeBugCheckEx(('X' << 16)|('E' << 8)|('N'), 0x00000002, extra_mb, j, 0x00000000);
     1.8        break;
     1.9      }
    1.10      else
    1.11 @@ -646,10 +647,10 @@ XenPci_InitialBalloonDown()
    1.12        #pragma warning(disable: 4127) /* conditional expression is constant */
    1.13        set_xen_guest_handle(reservation.extent_start, pfns);
    1.14        
    1.15 -      KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_decrease_reservation) - pfn_count = %d\n", pfn_count));
    1.16 +      //KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_decrease_reservation) - pfn_count = %d\n", pfn_count));
    1.17        ret = _HYPERVISOR_memory_op(hypercall_stubs, XENMEM_decrease_reservation, &reservation);
    1.18        ExFreePoolWithTag(pfns, XENPCI_POOL_TAG);
    1.19 -      KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
    1.20 +      //KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
    1.21        if (head)
    1.22        {
    1.23          mdl->Next = head;
     2.1 --- a/xenpci/xenpci_fdo.c	Sun Feb 27 16:19:40 2011 +1100
     2.2 +++ b/xenpci/xenpci_fdo.c	Sun Feb 27 21:20:26 2011 +1100
     2.3 @@ -261,6 +261,7 @@ XenPci_BalloonThreadProc(PVOID StartCont
     2.4      else
     2.5      {
     2.6        ptimeout = NULL;
     2.7 +      timeout_ms = 1000;
     2.8      }
     2.9      KeWaitForSingleObject(&xpdd->balloon_event, Executive, KernelMode, FALSE, ptimeout);
    2.10      if (xpdd->balloon_shutdown)
    2.11 @@ -294,12 +295,12 @@ XenPci_BalloonThreadProc(PVOID StartCont
    2.12          #pragma warning(disable: 4127) /* conditional expression is constant */
    2.13          set_xen_guest_handle(reservation.extent_start, pfns);
    2.14          
    2.15 -        KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_populate_physmap) - pfn_count = %d\n", pfn_count));
    2.16 +        //KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_populate_physmap) - pfn_count = %d\n", pfn_count));
    2.17          ret = HYPERVISOR_memory_op(xpdd, XENMEM_populate_physmap, &reservation);
    2.18 -        KdPrint((__DRIVER_NAME "     populated %d pages\n", ret));
    2.19 -        if(ret < (ULONG)pfn_count)
    2.20 +        //KdPrint((__DRIVER_NAME "     populated %d pages\n", ret));
    2.21 +        if (ret < (ULONG)pfn_count)
    2.22          {
    2.23 -          if(ret > 0)
    2.24 +          if (ret > 0)
    2.25            {
    2.26              /* We hit the Xen hard limit: reprobe. */
    2.27              reservation.nr_extents = ret;
    2.28 @@ -336,7 +337,7 @@ XenPci_BalloonThreadProc(PVOID StartCont
    2.29          #endif
    2.30          if (!mdl)
    2.31          {
    2.32 -          KdPrint((__DRIVER_NAME "     Allocation failed - try again in 1 second\n"));
    2.33 +          KdPrint((__DRIVER_NAME "     Allocation failed - try again soon\n"));
    2.34            break;
    2.35          }
    2.36          else
    2.37 @@ -363,10 +364,10 @@ XenPci_BalloonThreadProc(PVOID StartCont
    2.38            #pragma warning(disable: 4127) /* conditional expression is constant */
    2.39            set_xen_guest_handle(reservation.extent_start, pfns);
    2.40            
    2.41 -          KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_decrease_reservation) - pfn_count = %d\n", pfn_count));
    2.42 +          //KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op(XENMEM_decrease_reservation) - pfn_count = %d\n", pfn_count));
    2.43            ret = HYPERVISOR_memory_op(xpdd, XENMEM_decrease_reservation, &reservation);
    2.44            ExFreePoolWithTag(pfns, XENPCI_POOL_TAG);
    2.45 -          KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
    2.46 +          //KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
    2.47            if (head)
    2.48            {
    2.49              mdl->Next = head;
    2.50 @@ -380,7 +381,6 @@ XenPci_BalloonThreadProc(PVOID StartCont
    2.51          }
    2.52        }
    2.53      }
    2.54 -    timeout_ms = 1000;
    2.55    }
    2.56    //FUNCTION_EXIT();
    2.57  }