Messages in this thread | | | Date | Fri, 22 Jun 2007 22:46:34 +0530 | From | Srivatsa Vaddagiri <> | Subject | Re: cpuset attach_task to touch per-cpu kernel threads? |
| |
On Thu, Jun 21, 2007 at 10:51:52AM -0700, Paul Jackson wrote: > The only problem comes with kernel tasks that are pinned to less than > the entire system, and that are in the top cpuset.
That again is not fool-proof. What if kernel-tasks change their cpu affinity after we have done the is_pinned_kernel_thread() test? Ideally they should not, but one never knows!
IMHO we simply should not allow kernel threads to move out of top-cpuset (unless you know of a good reason where we may want to move them).
int cpuset_can_attach() {
int is_kthread = !tsk->mm || (tsk->flags & PF_BORROWED_MM);
...
/* Don't moved pinned kernel threads out of top cpuset */ if (is_kthread && oldcs == &top_cpuset && cs != oldcs) { task_unlock(tsk); mutex_unlock(&callback_mutex); put_task_struct(tsk); return -EINVAL; }
}
What do you think?
-- Regards, vatsa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |