dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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