summaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorKonstantin Khlebnikov2016-02-03 01:57:46 +0100
committerLinus Torvalds2016-02-03 17:28:43 +0100
commit30bdbb78009e67767983085e302bec6d97afc679 (patch)
tree8d4084215738d98a6eed66cd7e971e9cca5f279a /include/linux/mm.h
parentmm: warn about VmData over RLIMIT_DATA (diff)
downloadkernel-qcow2-linux-30bdbb78009e67767983085e302bec6d97afc679.tar.gz
kernel-qcow2-linux-30bdbb78009e67767983085e302bec6d97afc679.tar.xz
kernel-qcow2-linux-30bdbb78009e67767983085e302bec6d97afc679.zip
mm: polish virtual memory accounting
* add VM_STACK as alias for VM_GROWSUP/DOWN depending on architecture * always account VMAs with flag VM_STACK as stack (as it was before) * cleanup classifying helpers * update comments and documentation Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0b50d7848e3a..516e14944339 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -201,11 +201,13 @@ extern unsigned int kobjsize(const void *objp);
#endif
#ifdef CONFIG_STACK_GROWSUP
-#define VM_STACK_FLAGS (VM_GROWSUP | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
+#define VM_STACK VM_GROWSUP
#else
-#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
+#define VM_STACK VM_GROWSDOWN
#endif
+#define VM_STACK_FLAGS (VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
+
/*
* Special vmas that are non-mergable, non-mlock()able.
* Note: mm/huge_memory.c VM_NO_THP depends on this definition.