[PATCH] cpuset semaphore depth check optimize

Optimize the deadlock avoidance check on the global cpuset
semaphore cpuset_sem.  Instead of adding a depth counter to the
task struct of each task, rather just two words are enough, one
to store the depth and the other the current cpuset_sem holder.

Thanks to Nikita Danilov for the idea.

Signed-off-by: Paul Jackson <pj@sgi.com>

[ We may want to change this further, but at least it's now
  a totally internal decision to the cpusets code ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Paul Jackson
2005-09-12 04:30:30 -07:00
committed by Linus Torvalds
parent f24ec7f6c6
commit b3426599af
2 changed files with 9 additions and 5 deletions

View File

@ -785,7 +785,6 @@ struct task_struct {
short il_next;
#endif
#ifdef CONFIG_CPUSETS
short cpuset_sem_nest_depth;
struct cpuset *cpuset;
nodemask_t mems_allowed;
int cpuset_mems_generation;