From: Thomas Gleixner <tglx@linutronix.de>
To: Alex Thorlton <athorlton@sgi.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
John Stultz <john.stultz@linaro.org>, Russ Anderson <rja@sgi.com>,
Dimitri Sivanich <sivanich@sgi.com>
Subject: Re: [BUG] Boot hangs at clocksource_done_booting on large configs
Date: Mon, 31 Aug 2015 23:12:12 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1508312139030.15006@nanos> (raw)
In-Reply-To: <20150831180432.GQ20615@asylum.americas.sgi.com>
On Mon, 31 Aug 2015, Alex Thorlton wrote:
> I was able to hit this issue on 4.2-rc1 with our RTC disabled, to rule
> out any scaling issues related to multiple concurrent reads to our
> RTC's MMR.
And to rule out scaling issues you replaced the RTC MMR with HPET. Not
a very good choice:
HPET does not scale either. It's uncached memory mapped I/O. See
below.
> I'm hoping to get some input from the experts in this area, first of
> all, on whether the problem I'm seeing is actually what I think it is,
> and, if so, if I've solved it in the correct way.
I fear both the analysis and the solution is wrong.
Up to the point where the actual clocksource change happens there is
no reason why timer interrupts should not happen. And the code which
actually changes the clocksource is definitely called with interrupts
disabled. When that function returns the new clocksource is fully
functional and interrupts can happen again.
Now looking at your backtraces. Most CPUs are in the migration thread
and a few (3073,3078,3079,3082) are in the idle task.
>From the trace artifacts (? read_hpet) it looks like the clock source
change has been done and the cpus are on the way back from stop
machine.
But they are obviously held off by something. And that something looks
like the timekeeper sequence lock. Too bad, that we don't have a
backtrace for CPU0 in the log.
I really wonder how a machine that large works with HPET as
clocksource at all. hpet_read() is uncached memory mapped IO which
takes thousands of CPU cycles. Last time I looked it was around
1us. Let's take that number to do some math.
If all CPUs do that access at the same time, then it takes NCPUS
microseconds to complete if the memory mapped I/O scheduling is
completely fair, which I doubt. So with 4k CPUs thats whopping 4.096ms
and it gets worse if you go larger. That's more than a tick with
HZ=250.
I'm quite sure that you are staring at the HPET scalability bottleneck
and not at some actual kernel bug.
Your patch shifts some timing around so the issue does not happen, but
that's certainly not a solution.
Thanks,
tglx
next prev parent reply other threads:[~2015-08-31 21:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 18:04 Alex Thorlton
2015-08-31 18:25 ` Alex Thorlton
2015-08-31 20:32 ` Peter Zijlstra
2015-08-31 20:55 ` Alex Thorlton
2015-08-31 21:12 ` Thomas Gleixner [this message]
2015-09-01 17:33 ` Alex Thorlton
2015-09-01 20:54 ` Thomas Gleixner
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=alpine.DEB.2.11.1508312139030.15006@nanos \
--to=tglx@linutronix.de \
--cc=athorlton@sgi.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rja@sgi.com \
--cc=sivanich@sgi.com \
/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
all inboxes | Powered by JetHome®