Lines Matching refs:mm
183 static inline char * task_mem(struct mm_struct *mm, char *buffer) in task_mem() argument
189 down_read(&mm->mmap_sem); in task_mem()
190 for (vma = mm->mmap; vma; vma = vma->vm_next) { in task_mem()
215 mm->total_vm << (PAGE_SHIFT-10), in task_mem()
216 mm->locked_vm << (PAGE_SHIFT-10), in task_mem()
217 mm->rss << (PAGE_SHIFT-10), in task_mem()
220 up_read(&mm->mmap_sem); in task_mem()
283 struct mm_struct *mm; in proc_pid_status() local
288 mm = task->mm; in proc_pid_status()
289 if(mm) in proc_pid_status()
290 atomic_inc(&mm->mm_users); in proc_pid_status()
292 if (mm) { in proc_pid_status()
293 buffer = task_mem(mm, buffer); in proc_pid_status()
294 mmput(mm); in proc_pid_status()
314 struct mm_struct *mm; in proc_pid_stat() local
324 mm = task->mm; in proc_pid_stat()
325 if(mm) in proc_pid_stat()
326 atomic_inc(&mm->mm_users); in proc_pid_stat()
332 if (mm) { in proc_pid_stat()
334 down_read(&mm->mmap_sem); in proc_pid_stat()
335 vma = mm->mmap; in proc_pid_stat()
344 up_read(&mm->mmap_sem); in proc_pid_stat()
389 mm ? mm->rss : 0, /* you might want to shift this left 3 */ in proc_pid_stat()
391 mm ? mm->start_code : 0, in proc_pid_stat()
392 mm ? mm->end_code : 0, in proc_pid_stat()
393 (permitted && mm) ? mm->start_stack : 0, in proc_pid_stat()
409 if(mm) in proc_pid_stat()
410 mmput(mm); in proc_pid_stat()
491 struct mm_struct *mm; in proc_pid_statm() local
495 mm = task->mm; in proc_pid_statm()
496 if(mm) in proc_pid_statm()
497 atomic_inc(&mm->mm_users); in proc_pid_statm()
499 if (mm) { in proc_pid_statm()
501 down_read(&mm->mmap_sem); in proc_pid_statm()
502 vma = mm->mmap; in proc_pid_statm()
504 pgd_t *pgd = pgd_offset(mm, vma->vm_start); in proc_pid_statm()
522 up_read(&mm->mmap_sem); in proc_pid_statm()
523 mmput(mm); in proc_pid_statm()
568 struct mm_struct *mm; in m_start() local
573 mm = task->mm; in m_start()
574 if (mm && mm != current->mm && in m_start()
579 mm = NULL; in m_start()
580 if (mm) in m_start()
581 atomic_inc(&mm->mm_users); in m_start()
584 if (!mm) in m_start()
587 down_read(&mm->mmap_sem); in m_start()
588 map = mm->mmap; in m_start()
592 up_read(&mm->mmap_sem); in m_start()
593 mmput(mm); in m_start()
602 struct mm_struct *mm = map->vm_mm; in m_stop() local
603 up_read(&mm->mmap_sem); in m_stop()
604 mmput(mm); in m_stop()