mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
coredump: kill mm->core_done
Now that we have core_state->dumper list we can use it to wake up the sub-threads waiting for the coredump completion. This uglifies the code and .text grows by 47 bytes, but otoh mm_struct lessens by sizeof(struct completion). Also, with this change we can decouple exit_mm() from the coredumping code. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
182c515fd2
commit
a94e2d408e
3 changed files with 30 additions and 7 deletions
|
@ -691,7 +691,13 @@ static void exit_mm(struct task_struct * tsk)
|
|||
if (atomic_dec_and_test(&core_state->nr_threads))
|
||||
complete(&core_state->startup);
|
||||
|
||||
wait_for_completion(&mm->core_done);
|
||||
for (;;) {
|
||||
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
|
||||
if (!self.task) /* see coredump_finish() */
|
||||
break;
|
||||
schedule();
|
||||
}
|
||||
__set_task_state(tsk, TASK_RUNNING);
|
||||
down_read(&mm->mmap_sem);
|
||||
}
|
||||
atomic_inc(&mm->mm_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue