lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKfTPtBHechB1KkBeh-m-bzJ+ABJUgEi=bPwCq_uactrjmKMjQ@mail.gmail.com>
Date:   Mon, 18 Jul 2022 12:27:05 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Zackary Liu <zackary.liu.pro@...il.com>
Cc:     "mingo@...hat.com" <mingo@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "juri.lelli@...hat.com" <juri.lelli@...hat.com>,
        "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "bsegall@...gle.com" <bsegall@...gle.com>,
        "mgorman@...e.de" <mgorman@...e.de>,
        "bristot@...hat.com" <bristot@...hat.com>,
        "vschneid@...hat.com" <vschneid@...hat.com>,
        "kuyo.chang@...iatek.com" <kuyo.chang@...iatek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched/pelt: simplify load_sum assignment code in attach_entity_load_avg()

On Fri, 15 Jul 2022 at 16:33, Zackary Liu <zackary.liu.pro@...il.com> wrote:
>
>
>
> On Jun 22 2022, at 11:49 pm, Zackary Liu <zackary.liu.pro@...il.com> wrote:
>
> > On Jun 22 2022, at 11:20 pm, Vincent Guittot
> > <vincent.guittot@...aro.org> wrote:
> >
> >> On Tue, 21 Jun 2022 at 17:45, Zhaoyu Liu <zackary.liu.pro@...il.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'

As said, the current code is cleaner and easier to read and I don't
see any benefit from this patch.
So it's a NAK


> >
> > --
> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ