Blame SOURCES/0139-Reduce-timer-event-frequency-by-10.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Mark Salter <msalter@redhat.com>
f731ee
Date: Thu, 20 Feb 2014 12:54:52 -0500
f731ee
Subject: [PATCH] Reduce timer event frequency by 10
f731ee
f731ee
Timer event to keep grub msec counter was running at 1000HZ. This was too
f731ee
fast for UEFI timer driver and resulted in a 10x slowdown in grub time
f731ee
versus wallclock. Reduce the timer event frequency and increase tick
f731ee
increment accordingly to keep better time.
f731ee
f731ee
Signed-off-by: Mark Salter <msalter@redhat.com>
f731ee
---
f731ee
 grub-core/kern/arm/efi/init.c | 4 ++--
f731ee
 1 file changed, 2 insertions(+), 2 deletions(-)
f731ee
f731ee
diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c
f731ee
index a6ae03475cc..0c17d8390fa 100644
f731ee
--- a/grub-core/kern/arm/efi/init.c
f731ee
+++ b/grub-core/kern/arm/efi/init.c
f731ee
@@ -38,7 +38,7 @@ static void
f731ee
 increment_timer (grub_efi_event_t event __attribute__ ((unused)),
f731ee
 		 void *context __attribute__ ((unused)))
f731ee
 {
f731ee
-  tmr++;
f731ee
+  tmr += 10;
f731ee
 }
f731ee
 
f731ee
 void
f731ee
@@ -52,7 +52,7 @@ grub_machine_init (void)
f731ee
 
f731ee
   efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
f731ee
 	      GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt);
f731ee
-  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 10000);
f731ee
+  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000);
f731ee
 
f731ee
   grub_install_get_time_ms (grub_efi_get_time_ms);
f731ee
 }