From: "Gregory Haskins" <ghaskins@novell.com>
To: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
Cc: "Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Ingo Molnar" <mingo@elte.hu>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
<linux-kernel@vger.kernel.org>
Subject: Re: [sched-devel, patch-rfc] rework of "prioritize non-migratable tasks over migratable ones"
Date: Mon, 16 Jun 2008 12:44:37 -0600 [thread overview]
Message-ID: <48567C55.BA47.005A.0@novell.com> (raw)
In-Reply-To: <b647ffbd0806161059q7048ea40id0f4235ab19d6ca0@mail.gmail.com>
>>> On Mon, Jun 16, 2008 at 1:59 PM, in message
<b647ffbd0806161059q7048ea40id0f4235ab19d6ca0@mail.gmail.com>, "Dmitry
Adamushko" <dmitry.adamushko@gmail.com> wrote:
[snip]
> that's why I called the current (mine is similar)
> definition/implementation of "bound" (or "non-migratable" in my terms
> above) sub-optimal.
>
> hope it's clear now (and none of the important details are escaping me) :-)
Indeed. I understand your point now. To summarize: nr_cpus_allowed is not sufficient to determine if this "load-balancing" operation should be attempted. Rather, we need to consider whether task_4->cpus_allowed results in no preemption when looking at [1,3], but task_3->cpus_allowed shows the cpu_4 could be preempted.
This problem is easily and efficiently solvable, and I think your "HEAD" approach is better than my xqueue/squeue idea. Now the question remains: "Is the whole concept worth it, or should we drop it?"
If we wanted to fix this, we could run both current and the wakee into cpupri for the case where wakee->prio == rq->highest_prio (*). If wakee comes back with 0 targets but rq->HEAD (*) comes back with potential targets, then wakee should insert to the HEAD and preempt. Otherwise, tail-insert as always. (We will still race against the potential targets becoming unavailable to accept current, but as I indicated in the last message, this is unavoidable).
(*) Note that its important to use rq->highest_prio/HEAD and not rq->current so that we don't look at the state of the queue while in the process of rescheduling
Thanks for clarifying, Dmitry. I think you are right.
Regards,
-Greg
next prev parent reply other threads:[~2008-06-16 18:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 22:58 [sched-devel, patch-rfc] rework of "prioritize non-migratable tasks over migratable ones" Dmitry Adamushko
2008-06-11 8:53 ` Peter Zijlstra
2008-06-11 10:05 ` Dmitry Adamushko
2008-06-13 13:08 ` Peter Zijlstra
2008-06-16 14:26 ` Gregory Haskins
2008-06-16 17:59 ` Dmitry Adamushko
2008-06-16 18:44 ` Gregory Haskins [this message]
2008-06-16 19:17 ` Peter Zijlstra
2008-06-16 19:54 ` [sched-devel, patch-rfc] rework of "prioritize non-migratabletasks " Gregory Haskins
2008-06-18 10:39 ` Ingo Molnar
2008-06-18 10:47 ` Peter Zijlstra
2008-06-18 11:52 ` [sched-devel, patch-rfc] rework of "prioritizenon-migratabletasks " Gregory Haskins
2008-06-18 11:58 ` [sched-devel, patch-rfc] rework of "prioritize non-migratabletasks " Dmitry Adamushko
2008-07-01 10:46 ` [sched-devel, patch-rfc] rework of "prioritize non-migratable tasks " Dmitry Adamushko
2008-07-15 12:48 ` Peter Zijlstra
2008-06-18 10:44 ` 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=48567C55.BA47.005A.0@novell.com \
--to=ghaskins@novell.com \
--cc=a.p.zijlstra@chello.nl \
--cc=dmitry.adamushko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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