Lines Matching defs:mm
8 #include <linux/mm.h>
11 #include <linux/sched/mm.h>
443 * A task is exiting. If it owned this mm, find a new owner for the mm.
445 void mm_update_next_owner(struct mm_struct *mm)
454 if (mm->owner != p)
458 * candidates. Do not leave the mm pointing to a possibly
461 if (atomic_read(&mm->mm_users) <= 1) {
462 WRITE_ONCE(mm->owner, NULL);
471 if (c->mm == mm)
479 if (c->mm == mm)
490 if (c->mm == mm)
492 if (c->mm)
502 WRITE_ONCE(mm->owner, NULL);
509 * The task_lock protects c->mm from changing.
510 * We always want mm->owner->mm == mm
518 if (c->mm != mm) {
523 WRITE_ONCE(mm->owner, c);
524 lru_gen_migrate_mm(mm);
536 struct mm_struct *mm = current->mm;
538 exit_mm_release(current, mm);
539 if (!mm)
541 mmap_read_lock(mm);
542 mmgrab_lazy_tlb(mm);
543 BUG_ON(mm != current->active_mm);
549 * tsk->mm, and the loop in membarrier_global_expedited() may
553 * user-space memory, before clearing tsk->mm or the
558 current->mm = NULL;
560 enter_lazy_tlb(mm, current);
563 mmap_read_unlock(mm);
564 mm_update_next_owner(mm);
565 mmput(mm);
850 if (tsk->mm)
851 setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);