[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150605055837.GA15407@gmail.com>
Date: Fri, 5 Jun 2015 07:58:37 +0200
From: Ingo Molnar <mingo@...nel.org>
To: George Spelvin <linux@...izon.com>
Cc: adrian.hunter@...el.com, ak@...ux.intel.com, hpa@...or.com,
linux-kernel@...r.kernel.org, luto@...capital.net,
tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: Re: [PATCH RFC] x86, tsc: Allow for high latency in
quick_pit_calibrate()
* George Spelvin <linux@...izon.com> wrote:
> Ingo Molnar wrote:
> > - Alternatively, I also tried a different method: to set up the RTC
> > periodic IRQ during early boot, but not have an IRQ handler, polling
> > RTC_PF in the rtc_cmos_read(RTC_INTR_FLAGS) IRQ status byte.
> >
> > Unfortunately when I do this then PIO based RTC accesses can take
> > tens of thousands of cycles, and the resulting jitter is pretty bad
> > and hard to filter:
>
> Did you use rtc_cmos_read()? [...]
Yeah, so initially I did, but then after I noticed the overhead I introduced:
+unsigned char rtc_cmos_read_again(void)
+{
+ return inb(RTC_PORT(1));
+}
+
which compiles to a single INB instruction.
This didn't change the delay/cost behavior.
The numbers I cited, with tens of thousands of cycles per iteration, were from
such an optimized poll loop already.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists