lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] sched: introduce per-cpu var next_cpu to track search limit
On Mon, Apr 23, 2018 at 05:41:15PM -0700, subhra mazumdar wrote:
> @@ -17,6 +17,7 @@
> #include <trace/events/sched.h>
>
> DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
> +DEFINE_PER_CPU_SHARED_ALIGNED(int, next_cpu);
>
> #if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL)
> /*
> @@ -6018,6 +6019,7 @@ void __init sched_init(void)
> struct rq *rq;
>
> rq = cpu_rq(i);
> + per_cpu(next_cpu, i) = -1;

If you leave it uninitialized it'll be 0, and we can avoid that extra
branch in the next patch, no?

\
 
 \ /
  Last update: 2018-04-24 14:48    [W:0.089 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site