Dave Anderson wrote:
Dave Anderson wrote:
> Is it necessary that the "pcpu_info" check in get_active_set()
> needs to come before the "runqueues" and "per_cpu__runqueues"
> checks? I'd prefer it to be done last if at all possible.
Never mind -- I see that in your kernel patch you do this:
- struct task_struct *curr, *idle;
+ struct task_struct *curr;
so the pcpu_info check can be deferred in get_idle_threads()
but not in get_active_set().
Ideally I'd still like to defer it in get_active_set(), but it's
probably not worth the extra effort.
Actually, I still think it doesn't need to be checked first,
since your kernel patch also removes the per_cpu__runqueues
declaration:
-static DEFINE_PER_CPU(struct rq, runqueues);
So unless you've resurrected the "runqueues" symbol somewhere
it seemingly doesn't need to be checked first.
Anyway, here's how I'd like to do it. I can envision you
gents coming back in the future with other OpenVZ-specific
requests, so I've added a new ARCH_OPENVZ flag for a clearer
way to segregate your code.
Can you please verify (and fix if necessary) the attached patch?
It's 4.0-4.13.
Thanks,
Dave