lkml.org 
[lkml]   [2007]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2007-06-22 19:11    [W:0.040 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site