From: Chengming Zhou <zhouchengming@bytedance.com>
To: peterz@infradead.org
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
mingo@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [PATCH] sched/fair: update comments in enqueue/dequeue_entity()
Date: Wed, 15 Jun 2022 22:41:05 +0800 [thread overview]
Message-ID: <afaeed75-cb46-0551-74c5-ebe29a26ba16@bytedance.com> (raw)
In-Reply-To: <CAKfTPtAa9efmNq29KJgV46c-ncN866UViHuhJMdUrQYyhiNtzw@mail.gmail.com>
On 2022/6/3 20:08, Vincent Guittot wrote:
> On Wed, 1 Jun 2022 at 05:55, Chengming Zhou <zhouchengming@bytedance.com> wrote:
>>
>> When reading the sched_avg related code, I found the comments in
>> enqueue/dequeue_entity() are not updated with the current code.
>>
>> We don't add/subtract entity's runnable_avg from cfs_rq->runnable_avg
>> during enqueue/dequeue_entity(), those are done only for attach/detach.
>>
>> This patch updates the comments to reflect the current code working.
>>
>> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
>
> Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Hello Peter, would you mind picking up this little patch too?
Thanks.
>
>> ---
>> kernel/sched/fair.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index b3371fa40548..e0cd4052e32f 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -4348,7 +4348,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
>> /*
>> * When enqueuing a sched_entity, we must:
>> * - Update loads to have both entity and cfs_rq synced with now.
>> - * - Add its load to cfs_rq->runnable_avg
>> + * - For group_entity, update its runnable_weight to reflect the new
>> + * h_nr_running of its group cfs_rq.
>> * - For group_entity, update its weight to reflect the new share of
>> * its group cfs_rq
>> * - Add its new weight to cfs_rq->load.weight
>> @@ -4433,7 +4434,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
>> /*
>> * When dequeuing a sched_entity, we must:
>> * - Update loads to have both entity and cfs_rq synced with now.
>> - * - Subtract its load from the cfs_rq->runnable_avg.
>> + * - For group_entity, update its runnable_weight to reflect the new
>> + * h_nr_running of its group cfs_rq.
>> * - Subtract its previous weight from cfs_rq->load.weight.
>> * - For group entity, update its weight to reflect the new share
>> * of its group cfs_rq.
>> --
>> 2.36.1
>>
prev parent reply other threads:[~2022-06-15 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 3:55 Chengming Zhou
2022-06-03 12:08 ` Vincent Guittot
2022-06-15 14:41 ` Chengming Zhou [this message]
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=afaeed75-cb46-0551-74c5-ebe29a26ba16@bytedance.com \
--to=zhouchengming@bytedance.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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
all inboxes | Powered by JetHome®