> > I'm confused, how doesn't this break the invariant above? > > That is, all CPUs must at all times agree on the value of rq_lockp(), > and I'm not seeing how that is true with the above changes. > While fixing the crash in cpu online/offline, I was focusing on maintaining the invariance of all online cpus to agree on the value of rq_lockp(). Would it be safe to assume that rq and rq_lock would be used only after a cpu is onlined(sched:active)?.
To maintain the strict invariance, the sibling should also disable core scheduling, but we need to empty the rbtree before disabling it. I am trying to see how to empty the rbtree safely in the offline context. Thanks, Vineeth

