Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654429

Re: [6/7] sched/rt: make it configurable

From Nicolas Pitre <nicolas.pitre@linaro.org>
Newsgroups linux.kernel
Subject Re: [6/7] sched/rt: make it configurable
Date 2017-05-31 18:30 +0200
Message-ID <tNeFs-7az-35@gated-at.bofh.it> (permalink)
References <tMAeZ-5J1-5@gated-at.bofh.it> <tNem5-73N-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 6/7] sched/rt: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-05-29 23:20 +0200
  Re: [PATCH 6/7] sched/rt: make it configurable Peter Zijlstra <peterz@infradead.org> - 2017-05-30 10:50 +0200
    Re: [PATCH 6/7] sched/rt: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-05-30 14:20 +0200
      Re: [PATCH 6/7] sched/rt: make it configurable Peter Zijlstra <peterz@infradead.org> - 2017-05-30 14:40 +0200
        Re: [PATCH 6/7] sched/rt: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-05-31 04:20 +0200
        Re: [PATCH 6/7] sched/rt: make it configurable Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-05-31 12:00 +0200
          Re: [PATCH 6/7] sched/rt: make it configurable Peter Zijlstra <peterz@infradead.org> - 2017-05-31 12:50 +0200
  Re: [6/7] sched/rt: make it configurable Rob Herring <robh@kernel.org> - 2017-05-31 18:10 +0200
    Re: [6/7] sched/rt: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-05-31 18:30 +0200

csiph-web