From: Zackary Liu <zackary.liu.pro@gmail.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"bristot@redhat.com" <bristot@redhat.com>,
"vschneid@redhat.com" <vschneid@redhat.com>,
"kuyo.chang@mediatek.com" <kuyo.chang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/pelt: simplify load_sum assignment code in attach_entity_load_avg()
Date: Fri, 15 Jul 2022 22:33:30 +0800 [thread overview]
Message-ID: <F1E08DFA-40E8-447E-B37A-DEE651E87F80@getmailspring.com> (raw)
In-Reply-To: <7CD2EF28-F810-4733-8246-28D9821C180B@getmailspring.com>
On Jun 22 2022, at 11:49 pm, Zackary Liu <zackary.liu.pro@gmail.com> wrote:
> On Jun 22 2022, at 11:20 pm, Vincent Guittot
> <vincent.guittot@linaro.org> wrote:
>
>> On Tue, 21 Jun 2022 at 17:45, Zhaoyu Liu <zackary.liu.pro@gmail.com> wrote:
>>>
>>> In commit 40f5aa4c5eae ("sched/pelt: Fix attach_entity_load_avg()
>>> corner case"),
>>> these code was committed:
>>> if (se_weight(se) < se->avg.load_sum)
>>> se->avg.load_sum = div_u64(se->avg.load_sum, se_weight(se));
>>> else
>>> se->avg.load_sum = 1;
>>>
>>> they could be replace with:
>>> se->avg.load_sum = div_u64(se->avg.load_sum, se_weight(se))
>>> ?: 1;
>>>
>>> to make the code cleaner.
>>
>> This quite subjective as I consider current version cleaner than your proposal
>
> Thanks for your reply, vincent
>
> Perhaps, this code is more concise, and this form can exist in many
> places in the kernel, and can be searched with 'grep "?: 1;" -nR kernel'
>
> --
> zackary
I have sent a patch couple days ago but still i don't get the reply,
I am looking forward to your reply,
thank you
--
zackary
next prev parent reply other threads:[~2022-07-15 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 15:45 Zhaoyu Liu
2022-06-22 15:20 ` Vincent Guittot
2022-06-22 15:49 ` Zackary Liu
2022-07-15 14:33 ` Zackary Liu [this message]
2022-07-18 10:27 ` Vincent Guittot
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=F1E08DFA-40E8-447E-B37A-DEE651E87F80@getmailspring.com \
--to=zackary.liu.pro@gmail.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kuyo.chang@mediatek.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 \
--cc=vschneid@redhat.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
all inboxes | Powered by JetHome®