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]
Date:   Tue, 14 Feb 2023 08:44:43 +0900
From:   JaeJoon Jung <rgbi3307@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [kernel/sched/core.c] Review and Modified of the prio_less()
 about sched class priority.

Thank you for answering.
Is it going to be reflected in your patch?

JaeJoon Jung.

On Mon, 13 Feb 2023 at 19:08, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Mon, Feb 13, 2023 at 10:11:04AM +0900, JaeJoon Jung wrote:
> > The sched_class structure is defined to be sorted by pointer size.
> > @@ -176,22 +161,18 @@ static inline int __task_prio(struct task_struct *p)
> >  /* real prio, less is less */
> >  static inline bool prio_less(struct task_struct *a, struct
> > task_struct *b, bool in_fi)
> >  {
> > +        int less = a->sched_class - b->sched_class;
> >
> > +        if (less == 0) {
> > +                if (a->sched_class == &dl_sched_class)
> > +                        return !dl_time_before(a->dl.deadline, b->dl.deadline);
> >
> > +                else if (a->sched_class == &fair_sched_class)
> > +                        return cfs_prio_less(a, b, in_fi);
> > +                else
> > +                        return false;
> > +        } else
> > +                return (less > 0) ? true : false;
> >  }
> >
> > If the prio_less() function is modified as above, the __task_prio()
> > function is not required.
>
> Yeah, except your patch is whitespace mangled..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ