Messages in this thread | | | Date | Tue, 19 Jan 2010 10:07:46 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH 04/40] sched: implement __set_cpus_allowed() |
| |
Hello,
On 01/18/2010 08:41 PM, Peter Zijlstra wrote: > On Mon, 2010-01-18 at 20:22 +0900, Tejun Heo wrote: >> These part haven't changed at all since the last posting so if you >> disliked it before it's kind of expected you still do so. > > You could at least have augmented the changelog with the why.. my memory > thinks it had to so with that silly move back on up story. > >> Anyways, I'm not the greatest fan of this patch either. Let's see how >> the whole series fares out first and try to make this better. What do >> you think about doing what's described in the NOTE? > > I'm still not sure we need any of this. For new threads we have the > stopped state and kthread_bind() should work in its current form (except > you need patch 1 in your series when you're creating new threads when > the cpu is currently going down).
It's also necessary to guarantee forward progress during CPU_DOWN. The problem with kthread_bind() is that it's not synchronized against CPU hotplug operations. It needs outer synchronization like calling it directly from CPU_DOWN_PREP. I guess it's doable but I think it would be better to simply share the backend implementation between set_cpus_allowed_ptr() and kthread_bind().
Thanks.
-- tejun
| |