summaryrefslogtreecommitdiffstats
path: root/mm/Makefile
diff options
context:
space:
mode:
authorOleg Nesterov2006-09-29 11:01:09 +0200
committerLinus Torvalds2006-09-29 18:18:20 +0200
commit29b884921634e1e01cbd276e1c9b8fc07a7e4a90 (patch)
tree951fce8626715b1ad26ca81bec9002cfcb8242af /mm/Makefile
parent[PATCH] lockdep: core, add enable/disable_irq_irqsave/irqrestore() APIs (diff)
downloadkernel-qcow2-linux-29b884921634e1e01cbd276e1c9b8fc07a7e4a90.tar.gz
kernel-qcow2-linux-29b884921634e1e01cbd276e1c9b8fc07a7e4a90.tar.xz
kernel-qcow2-linux-29b884921634e1e01cbd276e1c9b8fc07a7e4a90.zip
[PATCH] set EXIT_DEAD state in do_exit(), not in schedule()
schedule() checks PF_DEAD on every context switch and sets ->state = EXIT_DEAD to ensure that the exiting task will be deactivated. Note that this EXIT_DEAD is in fact a "random" value, we can use any bit except normal TASK_XXX values. It is better to set this state in do_exit() along with PF_DEAD flag and remove that check in schedule(). We are safe wrt concurrent try_to_wake_up() (for example ptrace, tkill), it can not change task's ->state: the 'state' argument of try_to_wake_up() can't have EXIT_DEAD bit. And in case when try_to_wake_up() sees a stale value of ->state == TASK_RUNNING it will do nothing. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/Makefile')
0 files changed, 0 insertions, 0 deletions