diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
commit | 78a45c6f067824cf5d0a9fedea7339ac2e28603c (patch) | |
tree | b4f78c8b6b9059ddace0a18c11629b8d2045f793 /include/linux/mm.h | |
parent | f96fe225677b3efb74346ebd56fafe3997b02afa (diff) | |
parent | 29d293b6007b91a4463f05bc8d0b26e0e65c5816 (diff) |
Merge branch 'akpm' (second patch-bomb from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- misc fs fixes
- add execveat() syscall
- new ratelimit feature for fault-injection
- decompressor updates
- ipc/ updates
- fallocate feature creep
- fsnotify cleanups
- a few other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits)
cgroups: Documentation: fix trivial typos and wrong paragraph numberings
parisc: percpu: update comments referring to __get_cpu_var
percpu: update local_ops.txt to reflect this_cpu operations
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
fsnotify: remove destroy_list from fsnotify_mark
fsnotify: unify inode and mount marks handling
fallocate: create FAN_MODIFY and IN_MODIFY events
mm/cma: make kmemleak ignore CMA regions
slub: fix cpuset check in get_any_partial
slab: fix cpuset check in fallback_alloc
shmdt: use i_size_read() instead of ->i_size
ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
ipc/msg: increase MSGMNI, remove scaling
ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
lib/decompress.c: consistency of compress formats for kernel image
decompress_bunzip2: off by one in get_next_block()
usr/Kconfig: make initrd compression algorithm selection not expert
fault-inject: add ratelimit option
ratelimit: add initialization macro
...
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3b337efbe533..c0a67b894c4c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/bit_spinlock.h> | 19 | #include <linux/bit_spinlock.h> |
20 | #include <linux/shrinker.h> | 20 | #include <linux/shrinker.h> |
21 | #include <linux/resource.h> | 21 | #include <linux/resource.h> |
22 | #include <linux/page_ext.h> | ||
22 | 23 | ||
23 | struct mempolicy; | 24 | struct mempolicy; |
24 | struct anon_vma; | 25 | struct anon_vma; |
@@ -2060,7 +2061,22 @@ static inline void vm_stat_account(struct mm_struct *mm, | |||
2060 | #endif /* CONFIG_PROC_FS */ | 2061 | #endif /* CONFIG_PROC_FS */ |
2061 | 2062 | ||
2062 | #ifdef CONFIG_DEBUG_PAGEALLOC | 2063 | #ifdef CONFIG_DEBUG_PAGEALLOC |
2063 | extern void kernel_map_pages(struct page *page, int numpages, int enable); | 2064 | extern bool _debug_pagealloc_enabled; |
2065 | extern void __kernel_map_pages(struct page *page, int numpages, int enable); | ||
2066 | |||
2067 | static inline bool debug_pagealloc_enabled(void) | ||
2068 | { | ||
2069 | return _debug_pagealloc_enabled; | ||
2070 | } | ||
2071 | |||
2072 | static inline void | ||
2073 | kernel_map_pages(struct page *page, int numpages, int enable) | ||
2074 | { | ||
2075 | if (!debug_pagealloc_enabled()) | ||
2076 | return; | ||
2077 | |||
2078 | __kernel_map_pages(page, numpages, enable); | ||
2079 | } | ||
2064 | #ifdef CONFIG_HIBERNATION | 2080 | #ifdef CONFIG_HIBERNATION |
2065 | extern bool kernel_page_present(struct page *page); | 2081 | extern bool kernel_page_present(struct page *page); |
2066 | #endif /* CONFIG_HIBERNATION */ | 2082 | #endif /* CONFIG_HIBERNATION */ |
@@ -2094,9 +2110,9 @@ int drop_caches_sysctl_handler(struct ctl_table *, int, | |||
2094 | void __user *, size_t *, loff_t *); | 2110 | void __user *, size_t *, loff_t *); |
2095 | #endif | 2111 | #endif |
2096 | 2112 | ||
2097 | unsigned long shrink_slab(struct shrink_control *shrink, | 2113 | unsigned long shrink_node_slabs(gfp_t gfp_mask, int nid, |
2098 | unsigned long nr_pages_scanned, | 2114 | unsigned long nr_scanned, |
2099 | unsigned long lru_pages); | 2115 | unsigned long nr_eligible); |
2100 | 2116 | ||
2101 | #ifndef CONFIG_MMU | 2117 | #ifndef CONFIG_MMU |
2102 | #define randomize_va_space 0 | 2118 | #define randomize_va_space 0 |
@@ -2155,20 +2171,36 @@ extern void copy_user_huge_page(struct page *dst, struct page *src, | |||
2155 | unsigned int pages_per_huge_page); | 2171 | unsigned int pages_per_huge_page); |
2156 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ | 2172 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ |
2157 | 2173 | ||
2174 | extern struct page_ext_operations debug_guardpage_ops; | ||
2175 | extern struct page_ext_operations page_poisoning_ops; | ||
2176 | |||
2158 | #ifdef CONFIG_DEBUG_PAGEALLOC | 2177 | #ifdef CONFIG_DEBUG_PAGEALLOC |
2159 | extern unsigned int _debug_guardpage_minorder; | 2178 | extern unsigned int _debug_guardpage_minorder; |
2179 | extern bool _debug_guardpage_enabled; | ||
2160 | 2180 | ||
2161 | static inline unsigned int debug_guardpage_minorder(void) | 2181 | static inline unsigned int debug_guardpage_minorder(void) |
2162 | { | 2182 | { |
2163 | return _debug_guardpage_minorder; | 2183 | return _debug_guardpage_minorder; |
2164 | } | 2184 | } |
2165 | 2185 | ||
2186 | static inline bool debug_guardpage_enabled(void) | ||
2187 | { | ||
2188 | return _debug_guardpage_enabled; | ||
2189 | } | ||
2190 | |||
2166 | static inline bool page_is_guard(struct page *page) | 2191 | static inline bool page_is_guard(struct page *page) |
2167 | { | 2192 | { |
2168 | return test_bit(PAGE_DEBUG_FLAG_GUARD, &page->debug_flags); | 2193 | struct page_ext *page_ext; |
2194 | |||
2195 | if (!debug_guardpage_enabled()) | ||
2196 | return false; | ||
2197 | |||
2198 | page_ext = lookup_page_ext(page); | ||
2199 | return test_bit(PAGE_EXT_DEBUG_GUARD, &page_ext->flags); | ||
2169 | } | 2200 | } |
2170 | #else | 2201 | #else |
2171 | static inline unsigned int debug_guardpage_minorder(void) { return 0; } | 2202 | static inline unsigned int debug_guardpage_minorder(void) { return 0; } |
2203 | static inline bool debug_guardpage_enabled(void) { return false; } | ||
2172 | static inline bool page_is_guard(struct page *page) { return false; } | 2204 | static inline bool page_is_guard(struct page *page) { return false; } |
2173 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 2205 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
2174 | 2206 | ||