mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* cpuset: attach_task() vs sched_setaffinity() race?
@ 2007-08-25 16:26 Oleg Nesterov
  2007-08-28 13:48 ` cpusets vs cpu-hotplug interaction is broken? Oleg Nesterov
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Nesterov @ 2007-08-25 16:26 UTC (permalink / raw)
  To: Cliff Wickman, Paul Jackson, Paul Menage; +Cc: linux-kernel

After the brief look at kernel/cpuset.c, it seems that attach_task() should
guarantee that the task can't use CPUs outside of cpuset->cpus_allowed.

But this looks racy wrt sched_setaffinity() which does

	cpus_allowed = cpuset_cpus_allowed(p);
	// callback_mutex is free
	set_cpus_allowed(p);

What if attach_task()->set_cpus_allowed() happens in between?


Another question: update_cpumask(cs) does nothing with the tasks attached to
that cpuset, why? It may take a while before the task actually migrates to the
new CPU.

Thanks,

Oleg.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-29 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-25 16:26 cpuset: attach_task() vs sched_setaffinity() race? Oleg Nesterov
2007-08-28 13:48 ` cpusets vs cpu-hotplug interaction is broken? Oleg Nesterov
2007-08-29  8:51   ` Gautham R Shenoy
2007-08-29 10:52     ` Oleg Nesterov
2007-08-29 12:51       ` Gautham R Shenoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®