diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:42:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:42:48 -0500 |
commit | 40ba587923ae67090d9f141c1d3c951be5c1420e (patch) | |
tree | 342a72fc0ee13a0d2496ef970b64dfeadf1355d2 /include | |
parent | 54c2c5761febcca46c8037d3a81612991e6c209a (diff) | |
parent | 6b550f9495947fc279d12c38feaf98500e8d0646 (diff) |
Merge branch 'akpm' (aka "Andrew's patch-bomb")
Andrew elucidates:
- First installmeant of MM. We have a HUGE number of MM patches this
time. It's crazy.
- MAINTAINERS updates
- backlight updates
- leds
- checkpatch updates
- misc ELF stuff
- rtc updates
- reiserfs
- procfs
- some misc other bits
* akpm: (124 commits)
user namespace: make signal.c respect user namespaces
workqueue: make alloc_workqueue() take printf fmt and args for name
procfs: add hidepid= and gid= mount options
procfs: parse mount options
procfs: introduce the /proc/<pid>/map_files/ directory
procfs: make proc_get_link to use dentry instead of inode
signal: add block_sigmask() for adding sigmask to current->blocked
sparc: make SA_NOMASK a synonym of SA_NODEFER
reiserfs: don't lock root inode searching
reiserfs: don't lock journal_init()
reiserfs: delay reiserfs lock until journal initialization
reiserfs: delete comments referring to the BKL
drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
drivers/rtc/rtc-twl.c: add DT support for RTC inside twl4030/twl6030
drivers/rtc/: remove redundant spi driver bus initialization
drivers/rtc/rtc-jz4740.c: make jz4740_rtc_driver static
drivers/rtc/rtc-mc13xxx.c: make mc13xxx_rtc_idtable static
rtc: convert drivers/rtc/* to use module_platform_driver()
drivers/rtc/rtc-wm831x.c: convert to devm_kzalloc()
drivers/rtc/rtc-wm831x.c: remove unused period IRQ handler
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/compiler-gcc4.h | 1 | ||||
-rw-r--r-- | include/linux/compiler.h | 4 | ||||
-rw-r--r-- | include/linux/gfp.h | 23 | ||||
-rw-r--r-- | include/linux/kernel.h | 16 | ||||
-rw-r--r-- | include/linux/leds-tca6507.h | 34 | ||||
-rw-r--r-- | include/linux/mempolicy.h | 10 | ||||
-rw-r--r-- | include/linux/mm.h | 29 | ||||
-rw-r--r-- | include/linux/mmzone.h | 6 | ||||
-rw-r--r-- | include/linux/page-debug-flags.h | 4 | ||||
-rw-r--r-- | include/linux/pagevec.h | 7 | ||||
-rw-r--r-- | include/linux/pid_namespace.h | 2 | ||||
-rw-r--r-- | include/linux/proc_fs.h | 2 | ||||
-rw-r--r-- | include/linux/rmap.h | 1 | ||||
-rw-r--r-- | include/linux/signal.h | 1 | ||||
-rw-r--r-- | include/linux/swap.h | 1 | ||||
-rw-r--r-- | include/linux/workqueue.h | 47 | ||||
-rw-r--r-- | include/linux/writeback.h | 3 | ||||
-rw-r--r-- | include/trace/events/kmem.h | 4 | ||||
-rw-r--r-- | include/trace/events/oom.h | 33 | ||||
-rw-r--r-- | include/trace/events/task.h | 61 |
20 files changed, 252 insertions, 37 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index dfadc96e9d63..2f4079175afb 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -29,6 +29,7 @@ | |||
29 | the kernel context */ | 29 | the kernel context */ |
30 | #define __cold __attribute__((__cold__)) | 30 | #define __cold __attribute__((__cold__)) |
31 | 31 | ||
32 | #define __linktime_error(message) __attribute__((__error__(message))) | ||
32 | 33 | ||
33 | #if __GNUC_MINOR__ >= 5 | 34 | #if __GNUC_MINOR__ >= 5 |
34 | /* | 35 | /* |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 320d6c94ff84..4a243546d142 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -293,7 +293,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
293 | #ifndef __compiletime_error | 293 | #ifndef __compiletime_error |
294 | # define __compiletime_error(message) | 294 | # define __compiletime_error(message) |
295 | #endif | 295 | #endif |
296 | 296 | #ifndef __linktime_error | |
297 | # define __linktime_error(message) | ||
298 | #endif | ||
297 | /* | 299 | /* |
298 | * Prevent the compiler from merging or refetching accesses. The compiler | 300 | * Prevent the compiler from merging or refetching accesses. The compiler |
299 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), | 301 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 3a76faf6a3ee..581e74b7df95 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -36,6 +36,7 @@ struct vm_area_struct; | |||
36 | #endif | 36 | #endif |
37 | #define ___GFP_NO_KSWAPD 0x400000u | 37 | #define ___GFP_NO_KSWAPD 0x400000u |
38 | #define ___GFP_OTHER_NODE 0x800000u | 38 | #define ___GFP_OTHER_NODE 0x800000u |
39 | #define ___GFP_WRITE 0x1000000u | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * GFP bitmasks.. | 42 | * GFP bitmasks.. |
@@ -85,6 +86,7 @@ struct vm_area_struct; | |||
85 | 86 | ||
86 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | 87 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
87 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ | 88 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ |
89 | #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */ | ||
88 | 90 | ||
89 | /* | 91 | /* |
90 | * This may seem redundant, but it's a way of annotating false positives vs. | 92 | * This may seem redundant, but it's a way of annotating false positives vs. |
@@ -92,7 +94,7 @@ struct vm_area_struct; | |||
92 | */ | 94 | */ |
93 | #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) | 95 | #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) |
94 | 96 | ||
95 | #define __GFP_BITS_SHIFT 24 /* Room for N __GFP_FOO bits */ | 97 | #define __GFP_BITS_SHIFT 25 /* Room for N __GFP_FOO bits */ |
96 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) | 98 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) |
97 | 99 | ||
98 | /* This equals 0, but use constants in case they ever change */ | 100 | /* This equals 0, but use constants in case they ever change */ |
@@ -313,7 +315,7 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, | |||
313 | static inline struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask, | 315 | static inline struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask, |
314 | unsigned int order) | 316 | unsigned int order) |
315 | { | 317 | { |
316 | VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); | 318 | VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES || !node_online(nid)); |
317 | 319 | ||
318 | return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); | 320 | return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); |
319 | } | 321 | } |
@@ -358,6 +360,7 @@ void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); | |||
358 | extern void __free_pages(struct page *page, unsigned int order); | 360 | extern void __free_pages(struct page *page, unsigned int order); |
359 | extern void free_pages(unsigned long addr, unsigned int order); | 361 | extern void free_pages(unsigned long addr, unsigned int order); |
360 | extern void free_hot_cold_page(struct page *page, int cold); | 362 | extern void free_hot_cold_page(struct page *page, int cold); |
363 | extern void free_hot_cold_page_list(struct list_head *list, int cold); | ||
361 | 364 | ||
362 | #define __free_page(page) __free_pages((page), 0) | 365 | #define __free_page(page) __free_pages((page), 0) |
363 | #define free_page(addr) free_pages((addr), 0) | 366 | #define free_page(addr) free_pages((addr), 0) |
@@ -367,9 +370,25 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); | |||
367 | void drain_all_pages(void); | 370 | void drain_all_pages(void); |
368 | void drain_local_pages(void *dummy); | 371 | void drain_local_pages(void *dummy); |
369 | 372 | ||
373 | /* | ||
374 | * gfp_allowed_mask is set to GFP_BOOT_MASK during early boot to restrict what | ||
375 | * GFP flags are used before interrupts are enabled. Once interrupts are | ||
376 | * enabled, it is set to __GFP_BITS_MASK while the system is running. During | ||
377 | * hibernation, it is used by PM to avoid I/O during memory allocation while | ||
378 | * devices are suspended. | ||
379 | */ | ||
370 | extern gfp_t gfp_allowed_mask; | 380 | extern gfp_t gfp_allowed_mask; |
371 | 381 | ||
372 | extern void pm_restrict_gfp_mask(void); | 382 | extern void pm_restrict_gfp_mask(void); |
373 | extern void pm_restore_gfp_mask(void); | 383 | extern void pm_restore_gfp_mask(void); |
374 | 384 | ||
385 | #ifdef CONFIG_PM_SLEEP | ||
386 | extern bool pm_suspended_storage(void); | ||
387 | #else | ||
388 | static inline bool pm_suspended_storage(void) | ||
389 | { | ||
390 | return false; | ||
391 | } | ||
392 | #endif /* CONFIG_PM_SLEEP */ | ||
393 | |||
375 | #endif /* __LINUX_GFP_H */ | 394 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e8b1597b5cf2..f48e8a528544 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -665,6 +665,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
665 | #define BUILD_BUG_ON_ZERO(e) (0) | 665 | #define BUILD_BUG_ON_ZERO(e) (0) |
666 | #define BUILD_BUG_ON_NULL(e) ((void*)0) | 666 | #define BUILD_BUG_ON_NULL(e) ((void*)0) |
667 | #define BUILD_BUG_ON(condition) | 667 | #define BUILD_BUG_ON(condition) |
668 | #define BUILD_BUG() (0) | ||
668 | #else /* __CHECKER__ */ | 669 | #else /* __CHECKER__ */ |
669 | 670 | ||
670 | /* Force a compilation error if a constant expression is not a power of 2 */ | 671 | /* Force a compilation error if a constant expression is not a power of 2 */ |
@@ -703,6 +704,21 @@ extern int __build_bug_on_failed; | |||
703 | if (condition) __build_bug_on_failed = 1; \ | 704 | if (condition) __build_bug_on_failed = 1; \ |
704 | } while(0) | 705 | } while(0) |
705 | #endif | 706 | #endif |
707 | |||
708 | /** | ||
709 | * BUILD_BUG - break compile if used. | ||
710 | * | ||
711 | * If you have some code that you expect the compiler to eliminate at | ||
712 | * build time, you should use BUILD_BUG to detect if it is | ||
713 | * unexpectedly used. | ||
714 | */ | ||
715 | #define BUILD_BUG() \ | ||
716 | do { \ | ||
717 | extern void __build_bug_failed(void) \ | ||
718 | __linktime_error("BUILD_BUG failed"); \ | ||
719 | __build_bug_failed(); \ | ||
720 | } while (0) | ||
721 | |||
706 | #endif /* __CHECKER__ */ | 722 | #endif /* __CHECKER__ */ |
707 | 723 | ||
708 | /* Trap pasters of __FUNCTION__ at compile-time */ | 724 | /* Trap pasters of __FUNCTION__ at compile-time */ |
diff --git a/include/linux/leds-tca6507.h b/include/linux/leds-tca6507.h new file mode 100644 index 000000000000..dcabf4fa2aef --- /dev/null +++ b/include/linux/leds-tca6507.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * TCA6507 LED chip driver. | ||
3 | * | ||
4 | * Copyright (C) 2011 Neil Brown <neil@brown.name> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
18 | * 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_TCA6507_H | ||
22 | #define __LINUX_TCA6507_H | ||
23 | #include <linux/leds.h> | ||
24 | |||
25 | struct tca6507_platform_data { | ||
26 | struct led_platform_data leds; | ||
27 | #ifdef CONFIG_GPIOLIB | ||
28 | int gpio_base; | ||
29 | void (*setup)(unsigned gpio_base, unsigned ngpio); | ||
30 | #endif | ||
31 | }; | ||
32 | |||
33 | #define TCA6507_MAKE_GPIO 1 | ||
34 | #endif /* __LINUX_TCA6507_H*/ | ||
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 7978eec1b7d9..7c727a90d70d 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -164,11 +164,11 @@ static inline void mpol_get(struct mempolicy *pol) | |||
164 | atomic_inc(&pol->refcnt); | 164 | atomic_inc(&pol->refcnt); |
165 | } | 165 | } |
166 | 166 | ||
167 | extern int __mpol_equal(struct mempolicy *a, struct mempolicy *b); | 167 | extern bool __mpol_equal(struct mempolicy *a, struct mempolicy *b); |
168 | static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b) | 168 | static inline bool mpol_equal(struct mempolicy *a, struct mempolicy *b) |
169 | { | 169 | { |
170 | if (a == b) | 170 | if (a == b) |
171 | return 1; | 171 | return true; |
172 | return __mpol_equal(a, b); | 172 | return __mpol_equal(a, b); |
173 | } | 173 | } |
174 | 174 | ||
@@ -257,9 +257,9 @@ static inline int vma_migratable(struct vm_area_struct *vma) | |||
257 | 257 | ||
258 | struct mempolicy {}; | 258 | struct mempolicy {}; |
259 | 259 | ||
260 | static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b) | 260 | static inline bool mpol_equal(struct mempolicy *a, struct mempolicy *b) |
261 | { | 261 | { |
262 | return 1; | 262 | return true; |
263 | } | 263 | } |
264 | 264 | ||
265 | static inline void mpol_put(struct mempolicy *p) | 265 | static inline void mpol_put(struct mempolicy *p) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5d9b4c9813bd..6eba2cc016c9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1482,6 +1482,18 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma) | |||
1482 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; | 1482 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | /* Look up the first VMA which exactly match the interval vm_start ... vm_end */ | ||
1486 | static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm, | ||
1487 | unsigned long vm_start, unsigned long vm_end) | ||
1488 | { | ||
1489 | struct vm_area_struct *vma = find_vma(mm, vm_start); | ||
1490 | |||
1491 | if (vma && (vma->vm_start != vm_start || vma->vm_end != vm_end)) | ||
1492 | vma = NULL; | ||
1493 | |||
1494 | return vma; | ||
1495 | } | ||
1496 | |||
1485 | #ifdef CONFIG_MMU | 1497 | #ifdef CONFIG_MMU |
1486 | pgprot_t vm_get_page_prot(unsigned long vm_flags); | 1498 | pgprot_t vm_get_page_prot(unsigned long vm_flags); |
1487 | #else | 1499 | #else |
@@ -1618,5 +1630,22 @@ extern void copy_user_huge_page(struct page *dst, struct page *src, | |||
1618 | unsigned int pages_per_huge_page); | 1630 | unsigned int pages_per_huge_page); |
1619 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ | 1631 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ |
1620 | 1632 | ||
1633 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
1634 | extern unsigned int _debug_guardpage_minorder; | ||
1635 | |||
1636 | static inline unsigned int debug_guardpage_minorder(void) | ||
1637 | { | ||
1638 | return _debug_guardpage_minorder; | ||
1639 | } | ||
1640 | |||
1641 | static inline bool page_is_guard(struct page *page) | ||
1642 | { | ||
1643 | return test_bit(PAGE_DEBUG_FLAG_GUARD, &page->debug_flags); | ||
1644 | } | ||
1645 | #else | ||
1646 | static inline unsigned int debug_guardpage_minorder(void) { return 0; } | ||
1647 | static inline bool page_is_guard(struct page *page) { return false; } | ||
1648 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | ||
1649 | |||
1621 | #endif /* __KERNEL__ */ | 1650 | #endif /* __KERNEL__ */ |
1622 | #endif /* _LINUX_MM_H */ | 1651 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3ac040f19369..ca6ca92418a6 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -317,6 +317,12 @@ struct zone { | |||
317 | */ | 317 | */ |
318 | unsigned long lowmem_reserve[MAX_NR_ZONES]; | 318 | unsigned long lowmem_reserve[MAX_NR_ZONES]; |
319 | 319 | ||
320 | /* | ||
321 | * This is a per-zone reserve of pages that should not be | ||
322 | * considered dirtyable memory. | ||
323 | */ | ||
324 | unsigned long dirty_balance_reserve; | ||
325 | |||
320 | #ifdef CONFIG_NUMA | 326 | #ifdef CONFIG_NUMA |
321 | int node; | 327 | int node; |
322 | /* | 328 | /* |
diff --git a/include/linux/page-debug-flags.h b/include/linux/page-debug-flags.h index b0638fd91e92..22691f614043 100644 --- a/include/linux/page-debug-flags.h +++ b/include/linux/page-debug-flags.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | enum page_debug_flags { | 14 | enum page_debug_flags { |
15 | PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */ | 15 | PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */ |
16 | PAGE_DEBUG_FLAG_GUARD, | ||
16 | }; | 17 | }; |
17 | 18 | ||
18 | /* | 19 | /* |
@@ -21,7 +22,8 @@ enum page_debug_flags { | |||
21 | */ | 22 | */ |
22 | 23 | ||
23 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | 24 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS |
24 | #if !defined(CONFIG_PAGE_POISONING) \ | 25 | #if !defined(CONFIG_PAGE_POISONING) && \ |
26 | !defined(CONFIG_PAGE_GUARD) \ | ||
25 | /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */ | 27 | /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */ |
26 | #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features! | 28 | #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features! |
27 | #endif | 29 | #endif |
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index bab82f4c571c..ed17024d2ebe 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -21,7 +21,6 @@ struct pagevec { | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | void __pagevec_release(struct pagevec *pvec); | 23 | void __pagevec_release(struct pagevec *pvec); |
24 | void __pagevec_free(struct pagevec *pvec); | ||
25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 24 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
26 | void pagevec_strip(struct pagevec *pvec); | 25 | void pagevec_strip(struct pagevec *pvec); |
27 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 26 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
@@ -67,12 +66,6 @@ static inline void pagevec_release(struct pagevec *pvec) | |||
67 | __pagevec_release(pvec); | 66 | __pagevec_release(pvec); |
68 | } | 67 | } |
69 | 68 | ||
70 | static inline void pagevec_free(struct pagevec *pvec) | ||
71 | { | ||
72 | if (pagevec_count(pvec)) | ||
73 | __pagevec_free(pvec); | ||
74 | } | ||
75 | |||
76 | static inline void __pagevec_lru_add_anon(struct pagevec *pvec) | 69 | static inline void __pagevec_lru_add_anon(struct pagevec *pvec) |
77 | { | 70 | { |
78 | ____pagevec_lru_add(pvec, LRU_INACTIVE_ANON); | 71 | ____pagevec_lru_add(pvec, LRU_INACTIVE_ANON); |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 38d10326246a..e7cf6669ac34 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -30,6 +30,8 @@ struct pid_namespace { | |||
30 | #ifdef CONFIG_BSD_PROCESS_ACCT | 30 | #ifdef CONFIG_BSD_PROCESS_ACCT |
31 | struct bsd_acct_struct *bacct; | 31 | struct bsd_acct_struct *bacct; |
32 | #endif | 32 | #endif |
33 | gid_t pid_gid; | ||
34 | int hide_pid; | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | extern struct pid_namespace init_pid_ns; | 37 | extern struct pid_namespace init_pid_ns; |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 6d9e575519cc..85c507306239 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -253,7 +253,7 @@ extern const struct proc_ns_operations utsns_operations; | |||
253 | extern const struct proc_ns_operations ipcns_operations; | 253 | extern const struct proc_ns_operations ipcns_operations; |
254 | 254 | ||
255 | union proc_op { | 255 | union proc_op { |
256 | int (*proc_get_link)(struct inode *, struct path *); | 256 | int (*proc_get_link)(struct dentry *, struct path *); |
257 | int (*proc_read)(struct task_struct *task, char *page); | 257 | int (*proc_read)(struct task_struct *task, char *page); |
258 | int (*proc_show)(struct seq_file *m, | 258 | int (*proc_show)(struct seq_file *m, |
259 | struct pid_namespace *ns, struct pid *pid, | 259 | struct pid_namespace *ns, struct pid *pid, |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 2148b122779b..1afb9954bbf1 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -120,6 +120,7 @@ void anon_vma_init(void); /* create anon_vma_cachep */ | |||
120 | int anon_vma_prepare(struct vm_area_struct *); | 120 | int anon_vma_prepare(struct vm_area_struct *); |
121 | void unlink_anon_vmas(struct vm_area_struct *); | 121 | void unlink_anon_vmas(struct vm_area_struct *); |
122 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); | 122 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); |
123 | void anon_vma_moveto_tail(struct vm_area_struct *); | ||
123 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); | 124 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); |
124 | void __anon_vma_link(struct vm_area_struct *); | 125 | void __anon_vma_link(struct vm_area_struct *); |
125 | 126 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index a822300a253b..7987ce74874b 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -254,6 +254,7 @@ extern void set_current_blocked(const sigset_t *); | |||
254 | extern int show_unhandled_signals; | 254 | extern int show_unhandled_signals; |
255 | 255 | ||
256 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 256 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
257 | extern void block_sigmask(struct k_sigaction *ka, int signr); | ||
257 | extern void exit_signals(struct task_struct *tsk); | 258 | extern void exit_signals(struct task_struct *tsk); |
258 | 259 | ||
259 | extern struct kmem_cache *sighand_cachep; | 260 | extern struct kmem_cache *sighand_cachep; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 1e22e126d2ac..06061a7f8e69 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -207,6 +207,7 @@ struct swap_list_t { | |||
207 | /* linux/mm/page_alloc.c */ | 207 | /* linux/mm/page_alloc.c */ |
208 | extern unsigned long totalram_pages; | 208 | extern unsigned long totalram_pages; |
209 | extern unsigned long totalreserve_pages; | 209 | extern unsigned long totalreserve_pages; |
210 | extern unsigned long dirty_balance_reserve; | ||
210 | extern unsigned int nr_free_buffer_pages(void); | 211 | extern unsigned int nr_free_buffer_pages(void); |
211 | extern unsigned int nr_free_pagecache_pages(void); | 212 | extern unsigned int nr_free_pagecache_pages(void); |
212 | 213 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 0d556deb497b..eb8b9f15f2e0 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -297,32 +297,50 @@ extern struct workqueue_struct *system_unbound_wq; | |||
297 | extern struct workqueue_struct *system_freezable_wq; | 297 | extern struct workqueue_struct *system_freezable_wq; |
298 | 298 | ||
299 | extern struct workqueue_struct * | 299 | extern struct workqueue_struct * |
300 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | 300 | __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, |
301 | struct lock_class_key *key, const char *lock_name); | 301 | struct lock_class_key *key, const char *lock_name, ...) __printf(1, 6); |
302 | 302 | ||
303 | /** | ||
304 | * alloc_workqueue - allocate a workqueue | ||
305 | * @fmt: printf format for the name of the workqueue | ||
306 | * @flags: WQ_* flags | ||
307 | * @max_active: max in-flight work items, 0 for default | ||
308 | * @args: args for @fmt | ||
309 | * | ||
310 | * Allocate a workqueue with the specified parameters. For detailed | ||
311 | * information on WQ_* flags, please refer to Documentation/workqueue.txt. | ||
312 | * | ||
313 | * The __lock_name macro dance is to guarantee that single lock_class_key | ||
314 | * doesn't end up with different namesm, which isn't allowed by lockdep. | ||
315 | * | ||
316 | * RETURNS: | ||
317 | * Pointer to the allocated workqueue on success, %NULL on failure. | ||
318 | */ | ||
303 | #ifdef CONFIG_LOCKDEP | 319 | #ifdef CONFIG_LOCKDEP |
304 | #define alloc_workqueue(name, flags, max_active) \ | 320 | #define alloc_workqueue(fmt, flags, max_active, args...) \ |
305 | ({ \ | 321 | ({ \ |
306 | static struct lock_class_key __key; \ | 322 | static struct lock_class_key __key; \ |
307 | const char *__lock_name; \ | 323 | const char *__lock_name; \ |
308 | \ | 324 | \ |
309 | if (__builtin_constant_p(name)) \ | 325 | if (__builtin_constant_p(fmt)) \ |
310 | __lock_name = (name); \ | 326 | __lock_name = (fmt); \ |
311 | else \ | 327 | else \ |
312 | __lock_name = #name; \ | 328 | __lock_name = #fmt; \ |
313 | \ | 329 | \ |
314 | __alloc_workqueue_key((name), (flags), (max_active), \ | 330 | __alloc_workqueue_key((fmt), (flags), (max_active), \ |
315 | &__key, __lock_name); \ | 331 | &__key, __lock_name, ##args); \ |
316 | }) | 332 | }) |
317 | #else | 333 | #else |
318 | #define alloc_workqueue(name, flags, max_active) \ | 334 | #define alloc_workqueue(fmt, flags, max_active, args...) \ |
319 | __alloc_workqueue_key((name), (flags), (max_active), NULL, NULL) | 335 | __alloc_workqueue_key((fmt), (flags), (max_active), \ |
336 | NULL, NULL, ##args) | ||
320 | #endif | 337 | #endif |
321 | 338 | ||
322 | /** | 339 | /** |
323 | * alloc_ordered_workqueue - allocate an ordered workqueue | 340 | * alloc_ordered_workqueue - allocate an ordered workqueue |
324 | * @name: name of the workqueue | 341 | * @fmt: printf format for the name of the workqueue |
325 | * @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) | 342 | * @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) |
343 | * @args: args for @fmt | ||
326 | * | 344 | * |
327 | * Allocate an ordered workqueue. An ordered workqueue executes at | 345 | * Allocate an ordered workqueue. An ordered workqueue executes at |
328 | * most one work item at any given time in the queued order. They are | 346 | * most one work item at any given time in the queued order. They are |
@@ -331,11 +349,8 @@ __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | |||
331 | * RETURNS: | 349 | * RETURNS: |
332 | * Pointer to the allocated workqueue on success, %NULL on failure. | 350 | * Pointer to the allocated workqueue on success, %NULL on failure. |
333 | */ | 351 | */ |
334 | static inline struct workqueue_struct * | 352 | #define alloc_ordered_workqueue(fmt, flags, args...) \ |
335 | alloc_ordered_workqueue(const char *name, unsigned int flags) | 353 | alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args) |
336 | { | ||
337 | return alloc_workqueue(name, WQ_UNBOUND | flags, 1); | ||
338 | } | ||
339 | 354 | ||
340 | #define create_workqueue(name) \ | 355 | #define create_workqueue(name) \ |
341 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 356 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a378c295851f..6dff47304971 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -124,6 +124,7 @@ void laptop_mode_timer_fn(unsigned long data); | |||
124 | static inline void laptop_sync_completion(void) { } | 124 | static inline void laptop_sync_completion(void) { } |
125 | #endif | 125 | #endif |
126 | void throttle_vm_writeout(gfp_t gfp_mask); | 126 | void throttle_vm_writeout(gfp_t gfp_mask); |
127 | bool zone_dirty_ok(struct zone *zone); | ||
127 | 128 | ||
128 | extern unsigned long global_dirty_limit; | 129 | extern unsigned long global_dirty_limit; |
129 | 130 | ||
@@ -138,8 +139,6 @@ extern int vm_highmem_is_dirtyable; | |||
138 | extern int block_dump; | 139 | extern int block_dump; |
139 | extern int laptop_mode; | 140 | extern int laptop_mode; |
140 | 141 | ||
141 | extern unsigned long determine_dirtyable_memory(void); | ||
142 | |||
143 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, | 142 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, |
144 | void __user *buffer, size_t *lenp, | 143 | void __user *buffer, size_t *lenp, |
145 | loff_t *ppos); | 144 | loff_t *ppos); |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index a9c87ad8331c..5f889f16b0c8 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -147,7 +147,7 @@ DEFINE_EVENT(kmem_free, kmem_cache_free, | |||
147 | TP_ARGS(call_site, ptr) | 147 | TP_ARGS(call_site, ptr) |
148 | ); | 148 | ); |
149 | 149 | ||
150 | TRACE_EVENT(mm_page_free_direct, | 150 | TRACE_EVENT(mm_page_free, |
151 | 151 | ||
152 | TP_PROTO(struct page *page, unsigned int order), | 152 | TP_PROTO(struct page *page, unsigned int order), |
153 | 153 | ||
@@ -169,7 +169,7 @@ TRACE_EVENT(mm_page_free_direct, | |||
169 | __entry->order) | 169 | __entry->order) |
170 | ); | 170 | ); |
171 | 171 | ||
172 | TRACE_EVENT(mm_pagevec_free, | 172 | TRACE_EVENT(mm_page_free_batched, |
173 | 173 | ||
174 | TP_PROTO(struct page *page, int cold), | 174 | TP_PROTO(struct page *page, int cold), |
175 | 175 | ||
diff --git a/include/trace/events/oom.h b/include/trace/events/oom.h new file mode 100644 index 000000000000..dd4ba3b92002 --- /dev/null +++ b/include/trace/events/oom.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM oom | ||
3 | |||
4 | #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_OOM_H | ||
6 | #include <linux/tracepoint.h> | ||
7 | |||
8 | TRACE_EVENT(oom_score_adj_update, | ||
9 | |||
10 | TP_PROTO(struct task_struct *task), | ||
11 | |||
12 | TP_ARGS(task), | ||
13 | |||
14 | TP_STRUCT__entry( | ||
15 | __field( pid_t, pid) | ||
16 | __array( char, comm, TASK_COMM_LEN ) | ||
17 | __field( int, oom_score_adj) | ||
18 | ), | ||
19 | |||
20 | TP_fast_assign( | ||
21 | __entry->pid = task->pid; | ||
22 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | ||
23 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
24 | ), | ||
25 | |||
26 | TP_printk("pid=%d comm=%s oom_score_adj=%d", | ||
27 | __entry->pid, __entry->comm, __entry->oom_score_adj) | ||
28 | ); | ||
29 | |||
30 | #endif | ||
31 | |||
32 | /* This part must be outside protection */ | ||
33 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/task.h b/include/trace/events/task.h new file mode 100644 index 000000000000..b53add02e929 --- /dev/null +++ b/include/trace/events/task.h | |||
@@ -0,0 +1,61 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM task | ||
3 | |||
4 | #if !defined(_TRACE_TASK_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_TASK_H | ||
6 | #include <linux/tracepoint.h> | ||
7 | |||
8 | TRACE_EVENT(task_newtask, | ||
9 | |||
10 | TP_PROTO(struct task_struct *task, unsigned long clone_flags), | ||
11 | |||
12 | TP_ARGS(task, clone_flags), | ||
13 | |||
14 | TP_STRUCT__entry( | ||
15 | __field( pid_t, pid) | ||
16 | __array( char, comm, TASK_COMM_LEN) | ||
17 | __field( unsigned long, clone_flags) | ||
18 | __field( int, oom_score_adj) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->pid = task->pid; | ||
23 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | ||
24 | __entry->clone_flags = clone_flags; | ||
25 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
26 | ), | ||
27 | |||
28 | TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%d", | ||
29 | __entry->pid, __entry->comm, | ||
30 | __entry->clone_flags, __entry->oom_score_adj) | ||
31 | ); | ||
32 | |||
33 | TRACE_EVENT(task_rename, | ||
34 | |||
35 | TP_PROTO(struct task_struct *task, char *comm), | ||
36 | |||
37 | TP_ARGS(task, comm), | ||
38 | |||
39 | TP_STRUCT__entry( | ||
40 | __field( pid_t, pid) | ||
41 | __array( char, oldcomm, TASK_COMM_LEN) | ||
42 | __array( char, newcomm, TASK_COMM_LEN) | ||
43 | __field( int, oom_score_adj) | ||
44 | ), | ||
45 | |||
46 | TP_fast_assign( | ||
47 | __entry->pid = task->pid; | ||
48 | memcpy(entry->oldcomm, task->comm, TASK_COMM_LEN); | ||
49 | memcpy(entry->newcomm, comm, TASK_COMM_LEN); | ||
50 | __entry->oom_score_adj = task->signal->oom_score_adj; | ||
51 | ), | ||
52 | |||
53 | TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%d", | ||
54 | __entry->pid, __entry->oldcomm, | ||
55 | __entry->newcomm, __entry->oom_score_adj) | ||
56 | ); | ||
57 | |||
58 | #endif | ||
59 | |||
60 | /* This part must be outside protection */ | ||
61 | #include <trace/define_trace.h> | ||