From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [6/7] sched/rt: make it configurable
Date: Wed, 31 May 2017 12:25:50 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.20.1705311213320.17440@knanqh.ubzr> (raw)
In-Reply-To: <20170531160636.4zbbzjjbhhcxep7w@rob-hp-laptop>
On Wed, 31 May 2017, Rob Herring wrote:
> On Mon, May 29, 2017 at 05:03:01PM -0400, Nicolas Pitre wrote:
> > On most small systems where user space is tightly controlled, the realtime
> > scheduling class can often be dispensed with to reduce the kernel footprint.
> > Let's make it configurable.
> >
> > Signed-off-by: Nicolas Pitre <nico@linaro.org>
> > ---
>
> > static inline int rt_prio(int prio)
> > {
> > - if (unlikely(prio < MAX_RT_PRIO))
> > + if (IS_ENABLED(CONFIG_SCHED_RT) && unlikely(prio < MAX_RT_PRIO))
> > return 1;
> > return 0;
> > }
>
> > #ifdef CONFIG_PREEMPT_NOTIFIERS
> > INIT_HLIST_HEAD(&p->preempt_notifiers);
> > @@ -3716,13 +3720,18 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
> > p->sched_class = &dl_sched_class;
> > } else
> > #endif
> > +#ifdef CONFIG_SCHED_RT
> > if (rt_prio(prio)) {
>
> This ifdef is not necessary since rt_prio is conditioned on
> CONFIG_SCHED_RT already.
Yeah, that was the intent. In many places the conditioned code
dereferences p->rt.* and the compiler complains. So I added a couple
#ifdefs to make it build until something better comes to mind. This
particular one was unnecessary.
I'm on prettifying the whole thing at the moment. I wanted early
comments and so far they're all meaning the same thing which is good.
Nicolas
next prev parent reply other threads:[~2017-05-31 16:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 21:02 [PATCH 0/7] scheduler tinification Nicolas Pitre
2017-05-29 21:02 ` [PATCH 1/7] cpuset/sched: cpuset makes sense for SMP only Nicolas Pitre
2017-05-29 21:02 ` [PATCH 2/7] sched: omit stop_sched_class when !SMP Nicolas Pitre
2017-06-08 9:30 ` [tip:sched/core] sched/core: Omit building " tip-bot for Nicolas Pitre
2017-05-29 21:02 ` [PATCH 3/7] sched/deadline: move dl related code out of sched/core.c Nicolas Pitre
2017-05-29 21:02 ` [PATCH 4/7] sched/deadline: make it configurable Nicolas Pitre
2017-05-29 21:03 ` [PATCH 5/7] sched/rt: move rt related code out of sched/core.c Nicolas Pitre
2017-05-29 21:03 ` [PATCH 6/7] sched/rt: make it configurable Nicolas Pitre
2017-05-30 8:41 ` Peter Zijlstra
2017-05-30 12:17 ` Nicolas Pitre
2017-05-30 12:31 ` Peter Zijlstra
2017-05-31 2:18 ` Nicolas Pitre
2017-05-31 9:57 ` Daniel Bristot de Oliveira
2017-05-31 10:40 ` Peter Zijlstra
2017-05-31 16:06 ` [6/7] " Rob Herring
2017-05-31 16:25 ` Nicolas Pitre [this message]
2017-05-29 21:03 ` [PATCH 7/7] rtmutex: compatibility with CONFIG_SCHED_RT=n Nicolas Pitre
2017-05-30 8:32 ` [PATCH 0/7] scheduler tinification Peter Zijlstra
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=alpine.LFD.2.20.1705311213320.17440@knanqh.ubzr \
--to=nicolas.pitre@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.