[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] Add logging for Active/Maximum Processors


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Durrant, Paul" <xadimgnik@xxxxxxxxx>
  • Date: Wed, 7 Jun 2023 10:28:53 +0100
  • Delivery-date: Wed, 07 Jun 2023 09:28:58 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 25/05/2023 16:14, Owen Smith wrote:
Server 2022 can report Active = 32, Maximum = 64

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>

Acked-by: Paul Durrant <paul@xxxxxxx>

---
  src/xen/system.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/src/xen/system.c b/src/xen/system.c
index 3c01397..844deea 100644
--- a/src/xen/system.c
+++ b/src/xen/system.c
@@ -1263,6 +1263,7 @@ SystemInitialize(
      LONG            References;
      HANDLE          ParametersKey;
      ULONG           RegisterVcpuInfo;
+    ULONG           ActiveProcessors;
      NTSTATUS        status;
References = InterlockedIncrement(&Context->References);
@@ -1271,9 +1272,12 @@ SystemInitialize(
      if (References != 1)
          goto fail1;
+ ActiveProcessors = KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS);
      Context->ProcessorCount = 
KeQueryMaximumProcessorCountEx(ALL_PROCESSOR_GROUPS);
      Context->Processor = __SystemAllocate(sizeof (SYSTEM_PROCESSOR) * 
Context->ProcessorCount);
+ Info("CPUs %u / %u\n", ActiveProcessors, Context->ProcessorCount);
+
      status = STATUS_NO_MEMORY;
      if (Context->Processor == NULL)
          goto fail2;




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.