lkml.org 
[lkml]   [2019]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] sched: Micro optimization in pick_next_task() and in check_preempt_curr()
On Thu, Dec 19, 2019 at 08:50:42AM -0500, Steven Rostedt wrote:
> On Thu, 19 Dec 2019 15:39:14 +0300
> Kirill Tkhai <ktkhai@virtuozzo.com> wrote:
>
> > @@ -6569,6 +6558,11 @@ void __init sched_init(void)
> > unsigned long ptr = 0;
> > int i;
> >
> > + BUG_ON(&idle_sched_class > &fair_sched_class ||
> > + &fair_sched_class > &rt_sched_class ||
> > + &rt_sched_class > &dl_sched_class ||
> > + &dl_sched_class > &stop_sched_class);
> > +
>
> Can this be a BUILD_BUG_ON? These address should all be constants.

Nope, BUILD_BUG_ON() is for compile time constants, these are link time
constants.

\
 
 \ /
  Last update: 2019-12-19 14:55    [W:0.132 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site