On Mon, Apr 23, 2018 at 05:41:15PM -0700, subhra mazumdar wrote:0 can be a valid cpu id. I wanted to distinguish the first time. The branch
@@ -17,6 +17,7 @@If you leave it uninitialized it'll be 0, and we can avoid that extra
#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;
branch in the next patch, no?