Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-22 Thread Paul Jackson
Srivatsa wrote: > 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 Well ... in some

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-22 Thread Srivatsa Vaddagiri
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

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-22 Thread Srivatsa Vaddagiri
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

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-22 Thread Paul Jackson
Srivatsa wrote: 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 Well ... in some

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Paul Jackson
> Yeah .."allow movement if it doesn't result in changing kernel-threads's cpu > affinity" sounds good, except it is hard to implement in cpuset's > context I think. For ex: we now have to take additional steps when > changing 'cpus_allowed' of a cpuset such that it doesn't violate any cpu >

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Srivatsa Vaddagiri
On Thu, Jun 21, 2007 at 10:07:12AM -0700, Paul Jackson wrote: > Ingo, responding to Srivatsa: > > > Or maybe allow movement if it > > > doesn't result in changing kernel-threads's cpu affinity. > > > > yeah, i'd agree .. > > Good point. I'd agree too. Yeah .."allow movement if it doesn't

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Paul Jackson
Ingo, responding to Srivatsa: > > Or maybe allow movement if it > > doesn't result in changing kernel-threads's cpu affinity. > > yeah, i'd agree .. Good point. I'd agree too. -- I won't rest till it's the best ... Programmer, Linux Scalability

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Ingo Molnar
* Srivatsa Vaddagiri <[EMAIL PROTECTED]> wrote: > But I am wondering if attach_task() should leave kernel threads alone > and act only upon user-space threads. Or maybe allow movement if it > doesn't result in changing kernel-threads's cpu affinity. yeah, i'd agree with the latter. We could

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Ingo Molnar
* Srivatsa Vaddagiri [EMAIL PROTECTED] wrote: But I am wondering if attach_task() should leave kernel threads alone and act only upon user-space threads. Or maybe allow movement if it doesn't result in changing kernel-threads's cpu affinity. yeah, i'd agree with the latter. We could also

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Paul Jackson
Ingo, responding to Srivatsa: Or maybe allow movement if it doesn't result in changing kernel-threads's cpu affinity. yeah, i'd agree .. Good point. I'd agree too. -- I won't rest till it's the best ... Programmer, Linux Scalability

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Srivatsa Vaddagiri
On Thu, Jun 21, 2007 at 10:07:12AM -0700, Paul Jackson wrote: Ingo, responding to Srivatsa: Or maybe allow movement if it doesn't result in changing kernel-threads's cpu affinity. yeah, i'd agree .. Good point. I'd agree too. Yeah ..allow movement if it doesn't result in changing

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-21 Thread Paul Jackson
Yeah ..allow movement if it doesn't result in changing kernel-threads's cpu affinity sounds good, except it is hard to implement in cpuset's context I think. For ex: we now have to take additional steps when changing 'cpus_allowed' of a cpuset such that it doesn't violate any cpu affinity of

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-20 Thread Paul Jackson
Srivatsa wrote: # move all tasks from top cpuset to 'foo' cpuset sed -nu p < /dev/cpuset/tasks > /dev/cpuset/foo/tasks Aha - that won't work very well, as you noticed. In looking through my past email archives, I can see where I have recommended this trick to move things -into-

cpuset attach_task to touch per-cpu kernel threads?

2007-06-20 Thread Srivatsa Vaddagiri
Paul, You had once revealed a cute one-line command to move all tasks from one cpuset to another [1], which was: # move all tasks from top cpuset to 'foo' cpuset sed -nu p < /dev/cpuset/tasks > /dev/cpuset/foo/tasks I somewhat regret now having fallen for it and using it

cpuset attach_task to touch per-cpu kernel threads?

2007-06-20 Thread Srivatsa Vaddagiri
Paul, You had once revealed a cute one-line command to move all tasks from one cpuset to another [1], which was: # move all tasks from top cpuset to 'foo' cpuset sed -nu p /dev/cpuset/tasks /dev/cpuset/foo/tasks I somewhat regret now having fallen for it and using it

Re: cpuset attach_task to touch per-cpu kernel threads?

2007-06-20 Thread Paul Jackson
Srivatsa wrote: # move all tasks from top cpuset to 'foo' cpuset sed -nu p /dev/cpuset/tasks /dev/cpuset/foo/tasks Aha - that won't work very well, as you noticed. In looking through my past email archives, I can see where I have recommended this trick to move things -into- the