From: Ingo Molnar <mingo@kernel.org>
To: George Spelvin <linux@horizon.com>
Cc: adrian.hunter@intel.com, ak@linux.intel.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, luto@amacapital.net,
tglx@linutronix.de, torvalds@linux-foundation.org
Subject: Re: [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate()
Date: Fri, 5 Jun 2015 10:31:07 +0200 [thread overview]
Message-ID: <20150605083107.GA29843@gmail.com> (raw)
In-Reply-To: <20150605082453.11539.qmail@ns.horizon.com>
* George Spelvin <linux@horizon.com> wrote:
> > Ingo Molnar wrote:
> >* George Spelvin <linux@horizon.com> wrote:
> >> Did you use rtc_cmos_read()? [...]
>
> > Yeah, so initially I did, but then after I noticed the overhead I introduced:
> > 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.
>
> Apologies for doubting you!
No apologies needed: I should really have posted my code, but the boot
dependencies hackery I had to perform was way too embarrasing to post ...
> > note the 'loops' column. When it's around 117, then the read cost corresponds
> > roughly to the cheap-ish INB cost you have measured: 4188 cycles/loop.
> >
> > But note the frequent 30-40k cycles/loop outliers. They dominate the
> > measurement so filtering might not help.
>
> I don't quite understand hoe the numbers are derived. Why does 200K
> cycles/loop give 13 loops, while 35K cycles/loop gives 7? Is cycles/loop
> a maximum?
it's delta/loops. So the 200K line:
[ 0.000000] tsc: RTC edge 69 from 0 to 64, at 29700569301, delta: 2700528, jitter: 2454456, loops: 13, 207732 cycles/loop
had a very big 'delta' outlier, ~1.3 msecs when we did not manage to detect any
RTC edge.
I'll run your code as well, to make sure it's not something bad in my code.
Thanks,
Ingo
next prev parent reply other threads:[~2015-06-05 8:31 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 6:27 [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate() George Spelvin
2015-06-03 18:29 ` George Spelvin
2015-06-03 18:48 ` H. Peter Anvin
2015-06-03 19:07 ` George Spelvin
2015-06-04 16:38 ` George Spelvin
2015-06-04 16:52 ` Linus Torvalds
2015-06-04 17:54 ` George Spelvin
2015-06-04 18:07 ` Linus Torvalds
2015-06-05 5:52 ` George Spelvin
2015-06-05 6:16 ` Ingo Molnar
2015-06-05 5:58 ` Ingo Molnar
2015-06-05 8:24 ` George Spelvin
2015-06-05 8:31 ` Ingo Molnar [this message]
2015-06-05 20:17 ` George Spelvin
2015-06-06 21:50 ` George Spelvin
2015-06-09 6:54 ` [RFC PATCH] Make quick_pit_calibrate more robust George Spelvin
2015-06-09 9:13 ` Adrian Hunter
2015-06-09 9:54 ` George Spelvin
2015-06-10 7:08 ` Discussion: quick_pit_calibrate is slow George Spelvin
2015-06-10 7:30 ` Ingo Molnar
2015-06-10 8:47 ` George Spelvin
2015-06-10 9:25 ` Ingo Molnar
2015-06-10 15:43 ` George Spelvin
2015-06-10 15:56 ` Arjan van de Ven
2015-06-10 16:27 ` George Spelvin
2015-06-10 18:38 ` George Spelvin
2015-06-10 19:30 ` Arjan van de Ven
2015-06-10 22:19 ` George Spelvin
2015-06-10 8:13 ` Adrian Hunter
2015-06-10 8:55 ` George Spelvin
2015-06-10 9:12 ` Ingo Molnar
2015-06-10 16:11 ` George Spelvin
2015-06-10 7:32 ` Discussion: quick_pit_calibrate isn't quick George Spelvin
-- strict thread matches above, loose matches on Subject: below --
2015-05-21 7:55 [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate() Adrian Hunter
2015-06-01 7:57 ` Adrian Hunter
2015-06-02 13:58 ` Thomas Gleixner
2015-06-02 19:33 ` Thomas Gleixner
2015-06-02 19:41 ` Andy Lutomirski
2015-06-02 19:43 ` Andi Kleen
2015-06-02 19:58 ` Thomas Gleixner
2015-06-02 20:03 ` Andy Lutomirski
2015-06-02 20:20 ` Andi Kleen
2015-06-02 21:03 ` Thomas Gleixner
2015-06-02 23:38 ` Andi Kleen
2015-06-03 0:21 ` Andy Lutomirski
2015-06-03 0:39 ` Andi Kleen
2015-06-03 0:58 ` Andy Lutomirski
2015-06-03 3:30 ` Andi Kleen
2015-06-03 8:13 ` Adrian Hunter
2015-06-03 13:45 ` Linus Torvalds
2015-06-04 11:28 ` Adrian Hunter
2015-06-03 16:23 ` Thomas Gleixner
2015-06-22 11:21 ` Adrian Hunter
2015-06-22 13:14 ` Thomas Gleixner
2015-07-06 6:48 ` Adrian Hunter
2015-07-06 7:42 ` Thomas Gleixner
2015-06-22 14:12 ` George Spelvin
2015-06-03 4:20 ` Linus Torvalds
2015-06-03 6:20 ` Ingo Molnar
2015-06-03 13:43 ` Linus Torvalds
2015-06-03 16:47 ` Thomas Gleixner
2015-06-03 17:04 ` Linus Torvalds
2015-06-03 17:50 ` H. Peter Anvin
2015-06-04 12:32 ` Ingo Molnar
2015-06-03 17:06 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150605083107.GA29843@gmail.com \
--to=mingo@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=luto@amacapital.net \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).