Messages in this thread | | | Date | Sat, 25 Aug 2007 15:18:28 +0400 | From | Oleg Nesterov <> | Subject | Re: [PATCH 1/1] hotplug cpu: migrate a task within its cpuset |
| |
On 08/24, Cliff Wickman wrote: > > @@ -5091,6 +5092,17 @@ restart: > if (dest_cpu == NR_CPUS) > dest_cpu = any_online_cpu(p->cpus_allowed); > > + /* try to stay on the same cpuset */ > + if (dest_cpu == NR_CPUS) { > + /* > + * The cpuset_cpus_allowed_lock() variant of > + * cpuset_cpus_allowed() will not block > + * It must be called within calls to cpuset_lock/cpuset_unlock. > + */ > + p->cpus_allowed = cpuset_cpus_allowed_lock(p); > + dest_cpu = any_online_cpu(p->cpus_allowed);
Ugh, didn't notice while reading this patch.
We shouldn't change ->cpus_allowed without rq->lock. Please look what the current code does in "/* No more Mr. Nice Guy. */" case.
Oleg.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |