File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -856,6 +856,18 @@ int kthreadd(void *unused)
856856 return 0 ;
857857}
858858
859+ /**
860+ * kthread_affine_preferred - Define a kthread's preferred affinity
861+ * @p: thread created by kthread_create().
862+ * @mask: preferred mask of CPUs (might not be online, must be possible) for @p
863+ * to run on.
864+ *
865+ * Similar to kthread_bind_mask() except that the affinity is not a requirement
866+ * but rather a preference that can be constrained by CPU isolation or CPU hotplug.
867+ * Must be called before the first wakeup of the kthread.
868+ *
869+ * Returns 0 if the affinity has been applied.
870+ */
859871int kthread_affine_preferred (struct task_struct * p , const struct cpumask * mask )
860872{
861873 struct kthread * kthread = to_kthread (p );
You can’t perform that action at this time.
0 commit comments