From: "Jörn Engel" <joern@purestorage.com>
To: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>,
Gregory Haskins <ghaskins@novell.com>,
linux-kernel@vger.kernel.org
Subject: RFC: revert 43fa5460fe60
Date: Mon, 23 Feb 2015 16:43:40 -0800 [thread overview]
Message-ID: <20150224004340.GC31433@Sligo.logfs.org> (raw)
Hello Steven!
I came across a silly problem that tempted me to revert 43fa5460fe60.
We had a high-priority realtime thread woken, TIF_NEED_RESCHED was set
for the running thread and the realtime thread didn't run for >2s.
Problem was a system call that mapped a ton of device memory and never
hit a cond_resched() point. Obvious solution is to fix the long-running
system call.
Applying that solution quickly turns into a game of whack-a-mole. Not
the worst game in the world and all those moles surely deserve a solid
hit on the head. But what is annoying in my case is that I had plenty
of idle cpus during the entire time and the high-priority thread was
allowed to run anywhere. So if the thread had been moved to a different
runqueue immediately there would have been zero delay. Sure, the cache
is semi-cold or the migration may even be cross-package. That is a
tradeoff we are willing to make and we set the cpumask explicitly that
way. We want this thread to run quickly, anywhere.
So we could check for currently idle cpus when waking realtime threads.
If there are any, immediately move the woken thread over. Maybe have a
check whether the running thread on the current cpu is in a syscall and
retain current behaviour if not.
Now this is not quite the same as reverting 43fa5460fe60 and I would
like to verify the idea before I spend time on a patch you would never
consider merging anyway.
Jörn
--
As more agents are added, systems become more reliable in the total-effort
case, but less reliable in the weakest-link case. What are the implications?
Well, software companies schould hire more software testers and fewer (but
more competent) programmers.
-- Ross Anderson
next reply other threads:[~2015-02-24 0:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 0:43 Jörn Engel [this message]
2015-02-24 0:46 ` RFC: revert 43fa5460fe60 Jörn Engel
2015-02-24 7:30 ` RFC: revert 43fa5460fe60 ("sched: Try not to migrate higher priority RT tasks") Ingo Molnar
2015-02-24 15:33 ` RFC: revert 43fa5460fe60 Steven Rostedt
2015-02-24 17:19 ` Jörn Engel
2015-02-24 17:41 ` Steven Rostedt
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=20150224004340.GC31433@Sligo.logfs.org \
--to=joern@purestorage.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=srostedt@redhat.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