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

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



Server 2022 can report Active = 32, Maximum = 64

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>
---
 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;
-- 
2.39.0.windows.1




 


Rackspace

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