[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070622171634.GA21543@linux.vnet.ibm.com>
Date: Fri, 22 Jun 2007 22:46:34 +0530
From: Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
To: Paul Jackson <pj@....com>
Cc: mingo@...e.hu, clameter@....com, linux-kernel@...r.kernel.org,
dino@...ibm.com, akpm@...ux-foundation.org
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists