Re: [PATCH 3/5] mc146818rtc: properly count the time for the next interrupt

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

 





On 05/03/2017 11:32 PM, Paolo Bonzini wrote:
On 12/04/2017 11:51, guangrong.xiao@xxxxxxxxx wrote:
+#ifdef TARGET_I386
+            /*
+             * if more than period clocks were passed, i.e, the timer interrupt
+             * has been lost, we should catch up the time.
+             */
+            if (s->lost_tick_policy == LOST_TICK_POLICY_SLEW &&
+                (lost_clo / period)) {
+                int lost_interrupt = lost_clock / period;
+
+                s->irq_coalesced += lost_interrupt;
+                lost_clock -= lost_interrupt * period;
+                if (lost_interrupt) {
+                    DPRINTF_C("cmos: compensate %d interrupts, coalesced irqs "
+                              "increased to %d\n", lost_interrupt,
+                              s->irq_coalesced);
+                    rtc_coalesced_timer_update(s);
+                }

I think you should merge these two patches, since both of them
essentially update the number of coalesced ticks and then split it
between s->irq_coalesced and lost_clock.

I thought these two patches fix two different issues, one for clock
lost for coalesced-irq and another for period reconfiguration. Your
suggestion sounds reasonable indeed, will merged them in the next
version. :)




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux