diff options
-rw-r--r-- | arch/s390/mm/cmm.c | 1 | ||||
-rw-r--r-- | drivers/char/sysrq.c | 1 | ||||
-rw-r--r-- | include/linux/oom.h | 11 | ||||
-rw-r--r-- | include/linux/swap.h | 5 | ||||
-rw-r--r-- | mm/page_alloc.c | 1 |
5 files changed, 13 insertions, 6 deletions
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index fabc50adc46a..d4ed93dfb9c7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/swap.h> | 18 | #include <linux/swap.h> |
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/oom.h> | ||
20 | 21 | ||
21 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 39cc318011ea..179fa36ce485 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/kexec.h> | 36 | #include <linux/kexec.h> |
37 | #include <linux/irq.h> | 37 | #include <linux/irq.h> |
38 | #include <linux/hrtimer.h> | 38 | #include <linux/hrtimer.h> |
39 | #include <linux/oom.h> | ||
39 | 40 | ||
40 | #include <asm/ptrace.h> | 41 | #include <asm/ptrace.h> |
41 | #include <asm/irq_regs.h> | 42 | #include <asm/irq_regs.h> |
diff --git a/include/linux/oom.h b/include/linux/oom.h index ad76463629a0..b40bb4e32c2f 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
@@ -1,10 +1,19 @@ | |||
1 | #ifndef __INCLUDE_LINUX_OOM_H | 1 | #ifndef __INCLUDE_LINUX_OOM_H |
2 | #define __INCLUDE_LINUX_OOM_H | 2 | #define __INCLUDE_LINUX_OOM_H |
3 | 3 | ||
4 | #include <linux/sched.h> | ||
5 | |||
4 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ | 6 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ |
5 | #define OOM_DISABLE (-17) | 7 | #define OOM_DISABLE (-17) |
6 | /* inclusive */ | 8 | /* inclusive */ |
7 | #define OOM_ADJUST_MIN (-16) | 9 | #define OOM_ADJUST_MIN (-16) |
8 | #define OOM_ADJUST_MAX 15 | 10 | #define OOM_ADJUST_MAX 15 |
9 | 11 | ||
10 | #endif | 12 | #ifdef __KERNEL__ |
13 | |||
14 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); | ||
15 | extern int register_oom_notifier(struct notifier_block *nb); | ||
16 | extern int unregister_oom_notifier(struct notifier_block *nb); | ||
17 | |||
18 | #endif /* __KERNEL__*/ | ||
19 | #endif /* _INCLUDE_LINUX_OOM_H */ | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index edf681a7fd8f..4f3838adbb30 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -158,11 +158,6 @@ struct swap_list_t { | |||
158 | /* Swap 50% full? Release swapcache more aggressively.. */ | 158 | /* Swap 50% full? Release swapcache more aggressively.. */ |
159 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) | 159 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) |
160 | 160 | ||
161 | /* linux/mm/oom_kill.c */ | ||
162 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); | ||
163 | extern int register_oom_notifier(struct notifier_block *nb); | ||
164 | extern int unregister_oom_notifier(struct notifier_block *nb); | ||
165 | |||
166 | /* linux/mm/memory.c */ | 161 | /* linux/mm/memory.c */ |
167 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 162 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
168 | 163 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d315e1127dc9..0e3a05fd4734 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pagevec.h> | 27 | #include <linux/pagevec.h> |
28 | #include <linux/blkdev.h> | 28 | #include <linux/blkdev.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/oom.h> | ||
30 | #include <linux/notifier.h> | 31 | #include <linux/notifier.h> |
31 | #include <linux/topology.h> | 32 | #include <linux/topology.h> |
32 | #include <linux/sysctl.h> | 33 | #include <linux/sysctl.h> |