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

[win-pv-devel] [RFC PATCH 5/6] Increase concurrent calls to StartIo



By increasing concurrent StartIo calls, storage requests should be
better distributed over CPUs, and utilize multiple queues better.

Signed-off-by: owensm <owen.smith@xxxxxxxxxx>
---
 src/xenvbd/adapter.c | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index 7753388..b5e6e25 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -2139,6 +2139,47 @@ AdapterHwInitialize(
     IN  PVOID   DevExt
     )
 {
+    PERF_CONFIGURATION_DATA     PerfData;
+    ULONG                       CpuCount;
+    ULONG                       status;
+
+    RtlZeroMemory(&PerfData, sizeof(PERF_CONFIGURATION_DATA));
+    PerfData.Version = STOR_PERF_VERSION;
+    PerfData.Size = sizeof(PERF_CONFIGURATION_DATA);
+
+    status = StorPortInitializePerfOpts(DevExt, TRUE, &PerfData);
+    if (status == STOR_STATUS_SUCCESS) {
+        // display available options
+        Trace("PERF_CONFIGURATION_DATA = \n");
+        if (PerfData.Flags & STOR_PERF_DPC_REDIRECTION)
+            Trace("\tSTOR_PERF_DPC_REDIRECTION \n");
+        if (PerfData.Flags & STOR_PERF_CONCURRENT_CHANNELS)
+            Trace("\tSTOR_PERF_CONCURRENT_CHANNELS\n");
+        if (PerfData.Flags & STOR_PERF_INTERRUPT_MESSAGE_RANGES)
+            Trace("\tSTOR_PERF_INTERRUPT_MESSAGE_RANGES \n");
+        if (PerfData.Flags & STOR_PERF_ADV_CONFIG_LOCALITY)
+            Trace("\tSTOR_PERF_ADV_CONFIG_LOCALITY \n");
+        if (PerfData.Flags & STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO)
+            Trace("\tSTOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO \n");
+        if (PerfData.Flags & STOR_PERF_DPC_REDIRECTION_CURRENT_CPU)
+            Trace("\tSTOR_PERF_DPC_REDIRECTION_CURRENT_CPU  \n");
+        if (PerfData.Flags & STOR_PERF_NO_SGL)
+            Trace("\tSTOR_PERF_NO_SGL  \n");
+    }
+
+    CpuCount = KeQueryActiveProcessorCount(NULL);
+
+    RtlZeroMemory(&PerfData, sizeof(PERF_CONFIGURATION_DATA));
+    PerfData.Version = STOR_PERF_VERSION;
+    PerfData.Size = sizeof(PERF_CONFIGURATION_DATA);
+    PerfData.Flags = STOR_PERF_CONCURRENT_CHANNELS;
+    PerfData.ConcurrentChannels = CpuCount;
+
+    status = StorPortInitializePerfOpts(DevExt, FALSE, &PerfData);
+    if (status != STOR_STATUS_SUCCESS) {
+        Error("StorPortInitializePerfOpts failed (%08x)\n", status);
+    }
+
     return StorPortEnablePassiveInitialization(DevExt,
                                                AdapterHwPassiveInitialize);
 }
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

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