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 --
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Linus Torvalds | Linux 2.6.21-rc4 |
| Michael Kerrisk | nanosleep() uses CLOCK_MONOTONIC, should be CLOCK_REALTIME? |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Gary Thomas | Marvell 88E609x switch? |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
