From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Patrick Bellasi <patrick.bellasi@arm.com>,
Quentin Perret <quentin.perret@arm.com>,
kernel-team@android.com, Joel Fernandes <joelaf@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: Remove setting task's se->runnable_weight during PELT update
Date: Wed, 11 Jul 2018 10:43:28 +0200 [thread overview]
Message-ID: <0aba9bb6-eec7-130e-373f-5f87f192f2d4@arm.com> (raw)
In-Reply-To: <20180710230917.GA187293@joelaf.mtv.corp.google.com>
On 07/11/2018 01:09 AM, Joel Fernandes wrote:
> On Mon, Jul 09, 2018 at 05:47:53PM +0100, Dietmar Eggemann wrote:
>> A CFS (SCHED_OTHER, SCHED_BATCH or SCHED_IDLE policy) task's
>> se->runnable_weight must always be in sync with its se->load.weight.
>>
>> se->runnable_weight is set to se->load.weight when the task is
>> forked (init_entity_runnable_average()) or reniced (reweight_entity()).
>>
>> There are two cases in set_load_weight() which since they currently only
>> set se->load.weight could lead to a situation in which se->load.weight
>> is different to se->runnable_weight for a CFS task:
>>
>> (1) A task switches to SCHED_IDLE.
>>
>> (2) A SCHED_FIFO, SCHED_RR or SCHED_DEADLINE task which has been reniced
>> (during which only its static priority gets set) switches to
>> SCHED_OTHER or SCHED_BATCH.
>>
>> Set se->runnable_weight to se->load.weight in these two cases to prevent
>> this. This eliminates the need to explicitly set it to se->load.weight
>> during PELT updates in the CFS scheduler fastpath.
>
> Looks good to me. By the way just asking, is there a chance where
> se_weight(se) and se_runnable(se) can ever be different?
Yes they can be different, not for a task though but for se's
representing task groups. It got introduced to be able to propagate load
and runnable load independently through the task groups hierarchies.
next prev parent reply other threads:[~2018-07-11 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 16:47 Dietmar Eggemann
2018-07-10 23:09 ` Joel Fernandes
2018-07-11 8:43 ` Dietmar Eggemann [this message]
2018-07-12 8:17 ` Joel Fernandes
2018-07-13 14:57 ` Dietmar Eggemann
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=0aba9bb6-eec7-130e-373f-5f87f192f2d4@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=joel@joelfernandes.org \
--cc=joelaf@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=quentin.perret@arm.com \
--cc=vincent.guittot@linaro.org \
/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
Powered by JetHome