From: Peter Zijlstra <peterz@infradead.org>
To: Yuyang Du <yuyang.du@intel.com>
Cc: Byungchul Park <byungchul.park@lge.com>,
mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: sync with the cfs_rq when changing sched class
Date: Thu, 13 Aug 2015 17:22:12 +0200 [thread overview]
Message-ID: <20150813152212.GE16853@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150813021527.GB2143@intel.com>
On Thu, Aug 13, 2015 at 10:15:28AM +0800, Yuyang Du wrote:
> On Thu, Aug 13, 2015 at 05:21:27PM +0900, Byungchul Park wrote:
> >
> > yuyang said that switched_to don't need to consider task's load because it
> > can have meaningless value. but i think considering task's load is better
> > than leaving it unattended at all. and we can also use switched_to if we
> > consider task's load in switched_to.
>
> when did I say "don't need to consider..."?
>
> Doing more does not mean better, or just trivial. BTW, the task switched_to
> does not have to be switched_from before.
Correct, there's a few corner cases we need to consider.
However, I think we unconditionally call init_entity_runnable_average()
on all tasks, regardless of their 'initial' sched class, so it should
have a valid state.
Another thing to consider is the state being very stale, suppose it
started live as FAIR, ran for a bit, got switched to !FAIR by means of
sys_sched_setscheduler()/sys_sched_setattr() or similar, runs for a long
time and for some reason gets switched back to FAIR, we need to age and
or re-init things.
I _think_ we can use last_update_time for that, but I've not looked too
hard.
That is, age based on last_update_time, if all 0, reinit, or somesuch.
The most common case of switched_from()/switched_to() is Priority
Inheritance, and that typically results in very short lived stints as
!FAIR and the avg data should be still accurate by the time we return.
next prev parent reply other threads:[~2015-08-13 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 5:55 [PATCH] sched: sync with the cfs_rq when changing sched class byungchul.park
2015-08-12 22:41 ` Yuyang Du
2015-08-13 7:19 ` Byungchul Park
2015-08-13 2:30 ` Yuyang Du
2015-08-13 7:46 ` Peter Zijlstra
2015-08-13 8:21 ` Byungchul Park
2015-08-13 2:15 ` Yuyang Du
2015-08-13 10:56 ` Byungchul Park
2015-08-13 15:22 ` Peter Zijlstra [this message]
2015-08-13 23:20 ` Yuyang Du
2015-08-14 8:46 ` Peter Zijlstra
2015-08-15 6:52 ` Byungchul Park
2015-08-15 7:16 ` Byungchul Park
2015-08-13 8:42 ` Byungchul Park
2015-08-14 12:59 ` T. Zhou
2015-08-15 4:24 ` Byungchul Park
2015-08-15 12:34 ` T. Zhou
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=20150813152212.GE16853@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=yuyang.du@intel.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;
as well as URLs for NNTP newsgroup(s).