Lines Matching refs:mm
302 void mm_update_next_owner(struct mm_struct *mm) in mm_update_next_owner() argument
311 if (mm->owner != p) in mm_update_next_owner()
318 if (atomic_read(&mm->mm_users) <= 1) { in mm_update_next_owner()
319 mm->owner = NULL; in mm_update_next_owner()
328 if (c->mm == mm) in mm_update_next_owner()
336 if (c->mm == mm) in mm_update_next_owner()
347 if (c->mm == mm) in mm_update_next_owner()
349 if (c->mm) in mm_update_next_owner()
359 mm->owner = NULL; in mm_update_next_owner()
375 if (c->mm != mm) { in mm_update_next_owner()
380 mm->owner = c; in mm_update_next_owner()
392 struct mm_struct *mm = tsk->mm; in exit_mm() local
395 exit_mm_release(tsk, mm); in exit_mm()
396 if (!mm) in exit_mm()
398 sync_mm_rss(mm); in exit_mm()
406 down_read(&mm->mmap_sem); in exit_mm()
407 core_state = mm->core_state; in exit_mm()
411 up_read(&mm->mmap_sem); in exit_mm()
432 down_read(&mm->mmap_sem); in exit_mm()
434 atomic_inc(&mm->mm_count); in exit_mm()
435 BUG_ON(mm != tsk->active_mm); in exit_mm()
438 tsk->mm = NULL; in exit_mm()
439 up_read(&mm->mmap_sem); in exit_mm()
440 enter_lazy_tlb(mm, current); in exit_mm()
442 mm_update_next_owner(mm); in exit_mm()
443 mmput(mm); in exit_mm()
719 if (tsk->mm) in do_exit()
720 sync_mm_rss(tsk->mm); in do_exit()
726 if (tsk->mm) in do_exit()
727 setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm); in do_exit()