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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.20.1705311213320.17440@knanqh.ubzr>
Date:   Wed, 31 May 2017 12:25:50 -0400 (EDT)
From:   Nicolas Pitre <nicolas.pitre@...aro.org>
To:     Rob Herring <robh@...nel.org>
cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [6/7] sched/rt: make it configurable

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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ