Lines Matching full:mm
3 #include <linux/mm.h>
11 #include <linux/sched/mm.h>
21 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument
23 VMA_ITERATOR(vmi, mm, 0); in task_mem()
28 mmap_read_lock(mm); in task_mem()
40 if (atomic_read(&mm->mm_count) > 1 || in task_mem()
50 if (atomic_read(&mm->mm_count) > 1) in task_mem()
51 sbytes += kobjsize(mm); in task_mem()
53 bytes += kobjsize(mm); in task_mem()
72 mmap_read_unlock(mm); in task_mem()
81 unsigned long task_vsize(struct mm_struct *mm) in task_vsize() argument
83 VMA_ITERATOR(vmi, mm, 0); in task_vsize()
87 mmap_read_lock(mm); in task_vsize()
90 mmap_read_unlock(mm); in task_vsize()
94 unsigned long task_statm(struct mm_struct *mm, in task_statm() argument
98 VMA_ITERATOR(vmi, mm, 0); in task_statm()
101 unsigned long size = kobjsize(mm); in task_statm()
103 mmap_read_lock(mm); in task_statm()
113 *text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) in task_statm()
115 *data = (PAGE_ALIGN(mm->start_stack) - (mm->start_data & PAGE_MASK)) in task_statm()
117 mmap_read_unlock(mm); in task_statm()
129 struct mm_struct *mm = vma->vm_mm; in nommu_vma_show() local
161 } else if (mm && vma_is_initial_stack(vma)) { in nommu_vma_show()
196 struct mm_struct *mm; in m_start() local
202 /* pin the task and mm whilst we play with them */ in m_start()
207 mm = priv->mm; in m_start()
208 if (!mm || !mmget_not_zero(mm)) { in m_start()
214 if (mmap_read_lock_killable(mm)) { in m_start()
215 mmput(mm); in m_start()
221 vma_iter_init(&priv->iter, mm, last_addr); in m_start()
229 struct mm_struct *mm = priv->mm; in m_stop() local
234 mmap_read_unlock(mm); in m_stop()
235 mmput(mm); in m_stop()
262 priv->mm = proc_mem_open(inode, PTRACE_MODE_READ); in maps_open()
263 if (IS_ERR(priv->mm)) { in maps_open()
264 int err = PTR_ERR(priv->mm); in maps_open()
279 if (priv->mm) in map_release()
280 mmdrop(priv->mm); in map_release()