From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Sergey Oboguev <oboguev.public@gmail.com>,
linux-kernel@vger.kernel.org, khalid.aziz@oracle.com
Subject: Re: [PATCH RFC] sched: deferred set priority (dprio)
Date: Mon, 28 Jul 2014 09:24:49 +0200 [thread overview]
Message-ID: <1406532289.5133.223.camel@marge.simpson.net> (raw)
In-Reply-To: <8738dm9t4z.fsf@tassilo.jf.intel.com>
On Sun, 2014-07-27 at 18:19 -0700, Andi Kleen wrote:
> Sergey Oboguev <oboguev.public@gmail.com> writes:
>
> > [This is a repost of the message from few day ago, with patch file
> > inline instead of being pointed by the URL.]
>
> Have you checked out the preemption control that was posted some time
> ago? It did essentially the same thing, but somewhat simpler than your
> patch.
>
> http://lkml.iu.edu/hypermail/linux/kernel/1403.0/00780.html
>
> Yes I agree with you that lock preemption is a serious issue that needs solving.
Yeah, it's a problem, and well known.
One mitigation mechanism that exists in the stock kernel today is the
LAST_BUDDY scheduler feature. That took pgsql benchmarks from "shite"
to "shiny", and specifically targeted this issue.
Another is SCHED_BATCH, which can solve a lot of the lock problem by
eliminating wakeup preemption within an application. One could also
create an extended batch class which is not only immune from other
SCHED_BATCH and/or SCHED_IDLE tasks, but all SCHED_NORMAL wakeup
preemption. Trouble is that killing wakeup preemption precludes very
fast very light tasks competing with hogs for CPU time. If your load
depends upon these performing well, you have a problem.
Mechanism #3 is use of realtime scheduler classes. This one isn't
really a mitigation mechanism, it's more like donning a super suit.
So three mechanisms exist, the third being supremely effective, but high
frequency usage is expensive, ergo huge patch.
The lock holder preemption problem being identical to the problem RT
faces with kernel locks...
A lazy preempt implementation ala RT wouldn't have the SCHED_BATCH
problem, but would have a problem in that should critical sections not
be as tiny as it should be, every time you dodge preemption you're
fighting the fair engine, may pay heavily in terms of scheduling
latency. Not a big hairy deal, if it hurts, don't do that. Bigger
issue is that you have to pop into the kernel on lock acquisition and
release to avoid jabbering with the kernel via some public phone.
Popping into the kernel, if say some futex were victimized, also erases
the "f" in futex, and restricting cost to consumer won't be any easier.
The difference wrt cost acceptability is that the RT issue is not a
corner case, it's core issue resulting from the nature of the RT beast
itself, so the feature not being free is less annoying. A corner case
fix OTOH should not impact the general case at all.
Whatever outcome, I hope it'll be tiny. 1886 ain't tiny.
-Mike
next prev parent reply other threads:[~2014-07-28 7:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 19:45 [PATCH RFC] sched: deferred set priority (dprio) Sergey Oboguev
2014-07-25 20:12 ` Andy Lutomirski
2014-07-26 7:56 ` Sergey Oboguev
2014-07-26 8:58 ` Mike Galbraith
2014-07-26 18:30 ` Sergey Oboguev
2014-07-27 4:02 ` Mike Galbraith
2014-07-27 9:09 ` Sergey Oboguev
2014-07-27 10:29 ` Mike Galbraith
2014-07-28 1:19 ` Andi Kleen
2014-07-28 4:16 ` Sergey Oboguev
2014-07-28 7:24 ` Mike Galbraith [this message]
2014-08-03 0:43 ` Sergey Oboguev
2014-08-03 9:56 ` Mike Galbraith
2014-08-05 23:28 ` Sergey Oboguev
2014-08-06 5:41 ` Mike Galbraith
2014-08-06 7:42 ` Mike Galbraith
2014-08-07 1:26 ` Sergey Oboguev
2014-08-07 9:03 ` Mike Galbraith
2014-08-08 20:11 ` Sergey Oboguev
2014-08-09 13:04 ` Mike Galbraith
2014-08-09 18:04 ` Andi Kleen
2014-08-10 3:13 ` Mike Galbraith
2014-08-10 3:41 ` Mike Galbraith
2014-08-13 23:52 ` Sergey Oboguev
2014-08-09 8:38 ` Sergey Oboguev
2014-08-09 14:13 ` Mike Galbraith
2014-08-03 17:30 ` Andi Kleen
2014-08-05 23:13 ` Sergey Oboguev
2014-07-30 13:02 ` Pavel Machek
2014-08-03 0:47 ` Sergey Oboguev
2014-08-03 8:30 ` Pavel Machek
2014-08-05 23:03 ` Sergey Oboguev
-- strict thread matches above, loose matches on Subject: below --
2014-07-21 12:33 Sergey Oboguev
2014-07-21 18:14 ` 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=1406532289.5133.223.camel@marge.simpson.net \
--to=umgwanakikbuti@gmail.com \
--cc=andi@firstfloor.org \
--cc=khalid.aziz@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oboguev.public@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.