* Tejun Heo <t...@kernel.org> wrote: > PF_THREAD_BOUND was originally used to mark kernel threads which were > bound to a specific CPU using kthread_bind() and a task with the flag > set allows cpus_allowed modifications only to itself. Workqueue is > currently abusing it to prevent userland from meddling with > cpus_allowed of workqueue workers. > > What we need is a flag to prevent userland from messing with > cpus_allowed of certain kernel tasks. In kernel, anyone can > (incorrectly) squash the flag, and, for worker-type usages, > restricting cpus_allowed modification to the task itself doesn't > provide meaningful extra proection as other tasks can inject work > items to the task anyway. > > This patch replaces PF_THREAD_BOUND with PF_NO_SETAFFINITY. > sched_setaffinity() checks the flag and return -EINVAL if set. > set_cpus_allowed_ptr() is no longer affected by the flag. > > This will allow simplifying workqueue worker CPU affinity management.
Acked-by: Ingo Molnar <mi...@kernel.org> I suspect you want to carry this in the workqueue tree, to enable those extra simplifications? Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/