From: JaeJoon Jung <rgbi3307@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [kernel/sched/core.c] Review and Modified of the prio_less() about sched class priority.
Date: Tue, 14 Feb 2023 08:44:43 +0900 [thread overview]
Message-ID: <CAHOvCC4Fq6W00BO_w8+nC4SuQBeSX5eMBFMe9bgwpihCPH7TCw@mail.gmail.com> (raw)
In-Reply-To: <Y+oMND+7L7S9mByY@hirez.programming.kicks-ass.net>
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@infradead.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..
prev parent reply other threads:[~2023-02-13 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 1:11 JaeJoon Jung
2023-02-13 10:08 ` Peter Zijlstra
2023-02-13 23:44 ` JaeJoon Jung [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=CAHOvCC4Fq6W00BO_w8+nC4SuQBeSX5eMBFMe9bgwpihCPH7TCw@mail.gmail.com \
--to=rgbi3307@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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®