aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@oracle.com>2017-02-27 17:30:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-27 21:43:48 -0500
commitb279ddc3382426f8e05068de3488a2993f68dc26 (patch)
treef1d5eb73fd31c7e34856e8d581e3a9a3f1ffa17d
parent388f79345502232d335467e8fa6f8e55a18844e1 (diff)
mm: clarify mm_struct.mm_{users,count} documentation
Clarify documentation relating to mm_users and mm_count, and switch to kernel-doc syntax. Link: http://lkml.kernel.org/r/20161218123229.22952-4-vegard.nossum@oracle.com Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/mm_types.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 808751d7b737..4f6d440ad785 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -407,8 +407,27 @@ struct mm_struct {
407 unsigned long task_size; /* size of task vm space */ 407 unsigned long task_size; /* size of task vm space */
408 unsigned long highest_vm_end; /* highest vma end address */ 408 unsigned long highest_vm_end; /* highest vma end address */
409 pgd_t * pgd; 409 pgd_t * pgd;
410 atomic_t mm_users; /* How many users with user space? */ 410
411 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ 411 /**
412 * @mm_users: The number of users including userspace.
413 *
414 * Use mmget()/mmget_not_zero()/mmput() to modify. When this drops
415 * to 0 (i.e. when the task exits and there are no other temporary
416 * reference holders), we also release a reference on @mm_count
417 * (which may then free the &struct mm_struct if @mm_count also
418 * drops to 0).
419 */
420 atomic_t mm_users;
421
422 /**
423 * @mm_count: The number of references to &struct mm_struct
424 * (@mm_users count as 1).
425 *
426 * Use mmgrab()/mmdrop() to modify. When this drops to 0, the
427 * &struct mm_struct is freed.
428 */
429 atomic_t mm_count;
430
412 atomic_long_t nr_ptes; /* PTE page table pages */ 431 atomic_long_t nr_ptes; /* PTE page table pages */
413#if CONFIG_PGTABLE_LEVELS > 2 432#if CONFIG_PGTABLE_LEVELS > 2
414 atomic_long_t nr_pmds; /* PMD page table pages */ 433 atomic_long_t nr_pmds; /* PMD page table pages */