From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
Mark Langsdorf <mark.langsdorf@amd.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Prevent immediate process rescheduling
Date: Sat, 19 Sep 2009 04:16:45 +0200 [thread overview]
Message-ID: <1253326605.7133.55.camel@marge.simson.net> (raw)
In-Reply-To: <1253304203.10538.64.camel@laptop>
On Fri, 2009-09-18 at 22:03 +0200, Peter Zijlstra wrote:
> Really hate this change though,. doesn't seem right to not pick the same
> task again if its runnable. Bad for cache footprint.
>
> The scenario is quite common for stuff like:
>
> CPU0 CPU1
>
> set_task_state(TASK_INTERRUPTIBLE)
>
> if (cond)
> goto out;
> <--- ttwu()
> schedule();
It also resists the scheduler's built in need to close spread, too much
of which can seriously damage latency for others later when the friendly
task later decides it wants to run hard. OTOH, when it is a voluntary
schedule, not selecting another task is resisting the programmer.
Conundrum.
Another problem with that change is that it doesn't do diddly spit if
the top two are trying to yield, they'll just spin together.
Sounds like Mark's case really needs a gentle_yield() that moves the
task behind next, and slightly beyond if they are too close, but which
also ignores the request entirely if the gap is too large.
-Mike
next prev parent reply other threads:[~2009-09-19 2:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 19:49 [PATCH] Prevent immediate process rescheduling Mark Langsdorf
2009-09-18 19:54 ` Ingo Molnar
2009-09-18 20:00 ` Langsdorf, Mark
2009-09-18 20:03 ` Peter Zijlstra
2009-09-19 2:16 ` Mike Galbraith [this message]
2009-09-19 9:03 ` Mike Galbraith
2009-09-19 8:31 ` Avi Kivity
2009-09-20 21:03 ` Langsdorf, Mark
2009-09-20 21:55 ` Avi Kivity
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=1253326605.7133.55.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.langsdorf@amd.com \
--cc=mingo@elte.hu \
/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