David Rientjes wrote:Yes. I think what can and cannot be moved is a separate question. As far as cpu affinity API for kthreads goes it makes sense to support both scenarios. See below. CPU isolation. ie To avoid kernel activity on certain CPUs. That would be inconsistent and confusing, I think. If a task is in the cpuset X all constraints of the cpuset X must apply. If some constraints cannot be satisfied then that task should not be in the cpuset X. Yes cpusets are not only about cpu affinity. But again the behaviour should be consistent across the board. cpuset.cpus must apply to all the task in the set, not just some of the tasks. Also I think you missed my other point/suggestion. Yes your patch fixes one problem, which is kthreads that must not move will not move. Although like I said the behaviour with regards to the cpuset is not consistent and confusing. The other thing that I pointed out is that kthreads that _can_ move do not honor cpuset constrains. Let me give another example. Forget the workqueues for a second. Kthreads like scsi_eh, kswapd, kacpid, etc, etc are all started with cpus_allows=ALL_CPUS even though they inherit a cpuset from kthreadd. Yes I can move them manually but the behaviour is not consistent, and for no good reason. kthreads can be stopped/started at any time (module load for example) which means that I'd have to keep moving them. To sum it up here is what I'm suggesting: kthread_bind(task, cpu) { // Set PF_THREAD_BOUND // Move into root cpuset // Bind to the cpu } kthread_setaffinity(task, cpumask) { // Enforce cpuset.cpus_allowed // Updated affinity mask and migrate kthread (if needed) } Instead of calling set_cpus_allowed_ptr() kthreads that do not need strict cpu binding will be calling kthread_setaffinity(). That way the behaviour is consistent across the board. Makes sense ? Max --
| Rafael J. Wysocki | 2.6.28-rc2-git7: Reported regressions from 2.6.27 |
| Dave Hansen | Re: [RFC/PATCH] Documentation of kernel messages |
| Jesper Juhl | Re: [RFD] Documentation/HOWTO translated into Japanese |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Sander | 'struct task_struct' has no member named 'mems_allowed' (was: Re: 2.6.20-rc4-mm1) |
| Corey Minyard | [PATCH 3/3] Convert the UDP hash lock to RCU |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | Re: [GIT]: Networking |
