]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Drivers: hv: util: Increase the timeout for util services
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 15 Dec 2015 00:01:32 +0000 (16:01 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 31 May 2017 02:48:04 +0000 (19:48 -0700)
Util services such as KVP and FCOPY need assistance from daemon's running
in user space. Increase the timeout so we don't prematurely terminate
the transaction in the kernel. Host sets up a 60 second timeout for
all util driver transactions. The host will retry the transaction if it
times out. Set the guest timeout at 30 seconds.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Orabug: 25970637
(cherry picked from commit c0b200cfb0403740171c7527b3ac71d03f82947a)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/hv/hv_fcopy.c
drivers/hv/hv_kvp.c
drivers/hv/hyperv_vmbus.h

index a1204d0343a132dbcaeb410da01af5422f970ae0..0748148bec38c5399d704bb45f5852e49ee583a3 100644 (file)
@@ -276,7 +276,8 @@ void hv_fcopy_onchannelcallback(void *context)
                 * Send the information to the user-level daemon.
                 */
                schedule_work(&fcopy_send_work);
-               schedule_delayed_work(&fcopy_timeout_work, 5*HZ);
+               schedule_delayed_work(&fcopy_timeout_work,
+                                     HV_UTIL_TIMEOUT * HZ);
                return;
        }
        icmsghdr->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE;
index 76ae976f32e8e080ba1607bcd24b3744b583e7a4..d386063fc0267b4907fadb287ac785c6bb1a6b29 100644 (file)
@@ -667,7 +667,8 @@ void hv_kvp_onchannelcallback(void *context)
                         * user-mode not responding.
                         */
                        schedule_work(&kvp_sendkey_work);
-                       schedule_delayed_work(&kvp_timeout_work, 5*HZ);
+                       schedule_delayed_work(&kvp_timeout_work,
+                                             HV_UTIL_TIMEOUT * HZ);
 
                        return;
 
index 18c66fc039afe3be21c841b85bd43edafce1b314..b007e9c0107b9fc7db8820225d5cc9bb53549f8b 100644 (file)
 #include <linux/atomic.h>
 #include <linux/hyperv.h>
 
+/*
+ * Timeout for services such as KVP and fcopy.
+ */
+#define HV_UTIL_TIMEOUT 30
+
 /*
  * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
  * is set by CPUID(HVCPUID_VERSION_FEATURES).