qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] allow using a higher icount


From: Elisha Hollander
Subject: Re: [PATCH 1/1] allow using a higher icount
Date: Sat, 24 Aug 2024 22:46:42 +0300

Just wanted to ping 20240816162044.5764-1-just4now666666@gmail.com/" rel="noreferrer noreferrer" target="_blank">the patch

On Fri, Aug 16, 2024, 19:21 Elisha Hollander <just4now666666@gmail.com> wrote:
Signed-off-by: Elisha Hollander <just4now666666@gmail.com>
---
 accel/tcg/cpu-exec.c      | 4 +---
 accel/tcg/icount-common.c | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 8163295f34..4c2baf8ed4 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -95,11 +95,10 @@ static void align_clocks(SyncClocks *sc, CPUState *cpu)
 static void print_delay(const SyncClocks *sc)
 {
     static float threshold_delay;
-    static int64_t last_realtime_clock;
     static int nb_prints;

     if (icount_align_option &&
-        sc->realtime_clock - last_realtime_clock >= MAX_DELAY_PRINT_RATE &&
+        sc->diff_clk >= MAX_DELAY_PRINT_RATE &&
         nb_prints < MAX_NB_PRINTS) {
         if ((-sc->diff_clk / (float)1000000000LL > threshold_delay) ||
             (-sc->diff_clk / (float)1000000000LL <
@@ -109,7 +108,6 @@ static void print_delay(const SyncClocks *sc)
                         threshold_delay - 1,
                         threshold_delay);
             nb_prints++;
-            last_realtime_clock = sc->realtime_clock;
         }
     }
 }
diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c
index 8d3d3a7e9d..f07f8baf4d 100644
--- a/accel/tcg/icount-common.c
+++ b/accel/tcg/icount-common.c
@@ -46,8 +46,8 @@
  * is TCG-specific, and does not need to be built for other accels.
  */
 static bool icount_sleep = true;
-/* Arbitrarily pick 1MIPS as the minimum allowable speed.  */
-#define MAX_ICOUNT_SHIFT 10
+/* Arbitrarily pick the minimum allowable speed.  */
+#define MAX_ICOUNT_SHIFT 30

 /* Do not count executed instructions */
 ICountMode use_icount = ICOUNT_DISABLED;
--
2.30.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]