From: Sameer Wadgaonkar Date: Fri, 19 May 2017 20:17:58 +0000 (-0400) Subject: staging: unisys: visorbus: add comment to explain polling logic in controlvm_periodic... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d36c4857cbaede959e012045711a3467e857e132;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: unisys: visorbus: add comment to explain polling logic in controlvm_periodic_work Added a comment to explain polling frequency variation logic in controlvm_periodic_logic() in visorchipset.c. Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index c40a3701670a..8438b717b7b6 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -1787,6 +1787,11 @@ controlvm_periodic_work(struct work_struct *work) /* parahotplug_worker */ parahotplug_process_list(); +/* + * The controlvm messages are sent in a bulk. If we start receiving messages, we + * want the polling to be fast. If we do not receive any message for + * MIN_IDLE_SECONDS, we can slow down the polling. + */ schedule_out: if (time_after(jiffies, chipset_dev->most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) {