windows-rx_enable_hot_thread-20080220
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 20 Feb 2008 17:32:53 +0000 (17:32 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 20 Feb 2008 17:32:53 +0000 (17:32 +0000)
LICENSE MIT

Add RxEnableHotThread registry option to permit rx_enable_hot_thread
to be set.  The default is off for the moment but turning it on does
provide significant performance benefits.

src/WINNT/afsd/afsd_init.c

index 619ee73..afe0caa 100644 (file)
@@ -1050,6 +1050,17 @@ int afsd_InitCM(char **reasonP)
     if (rx_enable_process_stats)
         afsi_log("RX Process Statistics gathering is enabled");
 
+    dummyLen = sizeof(dwValue);
+    dwValue = 0;
+    code = RegQueryValueEx(parmKey, "RxEnableHotThread", NULL, NULL,
+                            (BYTE *) &dwValue, &dummyLen);
+     if (code == ERROR_SUCCESS && dwValue != 0) {
+         rx_EnableHotThread();
+         afsi_log("RX Hot Thread is enabled");
+     }
+     else
+         afsi_log("RX Hot Thread is disabled");
+
     dummyLen = sizeof(DWORD);
     code = RegQueryValueEx(parmKey, "CallBackPort", NULL, NULL,
                            (BYTE *) &dwValue, &dummyLen);