* [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong
@ 2009-08-21 19:19 Alexey Dobriyan
2009-08-21 19:51 ` David Rientjes
2009-08-26 7:29 ` KOSAKI Motohiro
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2009-08-21 19:19 UTC (permalink / raw)
To: akpm; +Cc: linux-mm
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
include/linux/gfp.h | 12 ------------
include/linux/oom.h | 11 +++++++++++
kernel/power/process.c | 1 +
3 files changed, 12 insertions(+), 12 deletions(-)
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -336,18 +336,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
void drain_all_pages(void);
void drain_local_pages(void *dummy);
-extern bool oom_killer_disabled;
-
-static inline void oom_killer_disable(void)
-{
- oom_killer_disabled = true;
-}
-
-static inline void oom_killer_enable(void)
-{
- oom_killer_disabled = false;
-}
-
extern gfp_t gfp_allowed_mask;
static inline void set_gfp_allowed_mask(gfp_t mask)
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -30,5 +30,16 @@ extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
extern int register_oom_notifier(struct notifier_block *nb);
extern int unregister_oom_notifier(struct notifier_block *nb);
+extern bool oom_killer_disabled;
+
+static inline void oom_killer_disable(void)
+{
+ oom_killer_disabled = true;
+}
+
+static inline void oom_killer_enable(void)
+{
+ oom_killer_disabled = false;
+}
#endif /* __KERNEL__*/
#endif /* _INCLUDE_LINUX_OOM_H */
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -9,6 +9,7 @@
#undef DEBUG
#include <linux/interrupt.h>
+#include <linux/oom.h>
#include <linux/suspend.h>
#include <linux/module.h>
#include <linux/syscalls.h>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong
2009-08-21 19:19 [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong Alexey Dobriyan
@ 2009-08-21 19:51 ` David Rientjes
2009-08-26 7:29 ` KOSAKI Motohiro
1 sibling, 0 replies; 3+ messages in thread
From: David Rientjes @ 2009-08-21 19:51 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: akpm, linux-mm
On Fri, 21 Aug 2009, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Although I never liked the oom_killer_{enable,disable}() solution in doing
swsusp, it's definitely defined in the wrong place.
Acked-by: David Rientjes <rientjes@google.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong
2009-08-21 19:19 [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong Alexey Dobriyan
2009-08-21 19:51 ` David Rientjes
@ 2009-08-26 7:29 ` KOSAKI Motohiro
1 sibling, 0 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-08-26 7:29 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: kosaki.motohiro, akpm, linux-mm
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
Please write proper patch description...
However, I think the code itself is right.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>
> include/linux/gfp.h | 12 ------------
> include/linux/oom.h | 11 +++++++++++
> kernel/power/process.c | 1 +
> 3 files changed, 12 insertions(+), 12 deletions(-)
>
> --- a/include/linux/gfp.h
> +++ b/include/linux/gfp.h
> @@ -336,18 +336,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
> void drain_all_pages(void);
> void drain_local_pages(void *dummy);
>
> -extern bool oom_killer_disabled;
> -
> -static inline void oom_killer_disable(void)
> -{
> - oom_killer_disabled = true;
> -}
> -
> -static inline void oom_killer_enable(void)
> -{
> - oom_killer_disabled = false;
> -}
> -
> extern gfp_t gfp_allowed_mask;
>
> static inline void set_gfp_allowed_mask(gfp_t mask)
> --- a/include/linux/oom.h
> +++ b/include/linux/oom.h
> @@ -30,5 +30,16 @@ extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
> extern int register_oom_notifier(struct notifier_block *nb);
> extern int unregister_oom_notifier(struct notifier_block *nb);
>
> +extern bool oom_killer_disabled;
> +
> +static inline void oom_killer_disable(void)
> +{
> + oom_killer_disabled = true;
> +}
> +
> +static inline void oom_killer_enable(void)
> +{
> + oom_killer_disabled = false;
> +}
> #endif /* __KERNEL__*/
> #endif /* _INCLUDE_LINUX_OOM_H */
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -9,6 +9,7 @@
> #undef DEBUG
>
> #include <linux/interrupt.h>
> +#include <linux/oom.h>
> #include <linux/suspend.h>
> #include <linux/module.h>
> #include <linux/syscalls.h>
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-26 7:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 19:19 [PATCH] oom: move oom_killer_enable()/oom_killer_disable to where they belong Alexey Dobriyan
2009-08-21 19:51 ` David Rientjes
2009-08-26 7:29 ` KOSAKI Motohiro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.